You need to set user's id before running saveField() like *$this->User->id =
1*, then you need to call *$this->User->saveField('status', 'active')*. Hope
this helps


2008/12/17 gearvOsh <[email protected]>

>
> Ok, I may be stupid...  but how would I update a single field on a
> single row. Something like the following without having to write a
> custom query.
>
> UPDATE users SET status = 'active' WHERE id = 1
>
> Ive tried doing saveField() but that inserts a new row. Ive also tried
> using updateAll() but that doesnt clean/escape the data correctly. Ive
> also tried $this->Model->set() and then doing a save but also no. Any
> ideas?
> >
>


-- 
Amit

http://amitrb.wordpress.com/
http://coppermine-gallery.net/
http://cheesecake-photoblog.org/
http://www.sanisoft.com/blog/author/amitbadkas

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to