You should change the usage of the model->query statement into a model-
>saveField statement, see the CakePHP book at:
http://book.cakephp.org/#!/view/1031/Saving-Your-Data

Anyway, your SQL statement is wrong, please have a look at:
http://www.w3schools.com/sql/sql_update.asp

Enjoy,
   John

On 15 Feb., 07:11, "[email protected]" <[email protected]> wrote:
> Hi All,
> Ok guys, what am I doing wrong...?
>
>  $this->Guest->query('UPDATE fociki_guests' .  'SET user_id =
> ($user['User']['id'])' . ' AND guest_id = ($this->user['id'])');
>
> I need to update guest table every time its accessed by users to any
> User page. First I need to make this code straight it up... Please
> help. I can't make it work...
>
> Thanks
> chris

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to