probably you have a validate for username being not empty or password or something like that, go with saveField it will be marginally faster ;)
On 12/4/06, Mariano Iglesias <[EMAIL PROTECTED]> wrote: > > When updating a single field it is better to use saveField(). Assuming 4 is > the ID of the user you are trying to save: > > $this->User->id = 4; > $this->User->saveField('last_login', date('Y-m-d H:i:s')) > > If your query is only saving when disabling validation that means that it is > not validating :) You should debug to see what fields are invalid. > > -MI > > --------------------------------------------------------------------------- > > Remember, smart coders answer ten questions for every question they ask. > So be smart, be cool, and share your knowledge. > > BAKE ON! > > -----Mensaje original----- > De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre > de Seb > Enviado el: Martes, 05 de Diciembre de 2006 02:02 a.m. > Para: Cake PHP > Asunto: manually update datetime field... > > I do this; > > $someone['User']['last_login'] = date('Y-m-d H:i:s'); > $this->User->save($someone); > > Which should be updating the last_login field with the current > datetimestamp; though it doesn't work. > > > > > -- == S. DeVore (the old fart) the advice is free, the lack of crankiness will cost you --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---