This can help you?
$this->Picture->query("UPDATE User SET status='active';");
Em terça-feira, 17 de junho de 2014 09h10min30s UTC-3, સાદીકહસન પલસાણીયા
escreveu:
>
> $this->loadModel('User');
> $this->User->updateAll(array('stauts'=>'active'),array());
>
> Above code equvivalent SQL query is generated like this
>
> UPDATE User SET status='active' WHERE 0 = 1;
>
> When I written updateAll in cakephp like below
>
> $this->loadModel('User');
> $this->User->updateAll(array('stauts'=>'active'));
>
> This code equvivalent SQL query is generated like this
>
> UPDATE User SET status='active';
>
> Why this happen I don't know. If I do not understand my question let me
> know in comment. I explain in breif.
>
>
> Check reference :
> http://stackoverflow.com/questions/24259110/magic-of-updateall?noredirect=1#comment37476920_24259110
>
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.