I've searched and I've searched, I see people mentioning it, but I'm not really sure how to increment the value of 'hitField'? How do I tell updateAll to add one to the existing value?
Thanks in advance! On Mar 26, 11:35 am, Adam Royle <[EMAIL PROTECTED]> wrote: > $Model->updateAll(); > > Cheers, > Adam > > On Mar 26, 8:17 pm, "dr. Hannibal Lecter" <[EMAIL PROTECTED]> wrote: > > > Hi everyone, > > > I'm working on a behaviour, and I'm currently running my query like > > this: > > > $Model->query( > > 'UPDATE '.$Model->table.' > > SET '.$_settings['hitField'].' = > > '.$_settings['hitField'].' > > + 1 > > WHERE '.$_settings['keyField'].' = '.$key.';' > > ); > > > But this doesn't seem "Cakeish" enough, is there a better way to run > > the same query? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~----------~----~----~----~------~----~------~--~---
