The problem is the value sky needs single quotes around it otherwise
MySQL tries to find a field with that name. The bigger problem is I
have no idea why Cake would take the value and not wrap it in single
quotes as it always has done for me no matter what version I have
used.
What do you get if you echo debug($name);? There must be something
odd with that variable for Cake to treat it differently.
What happens if you change your call to:
$this->Theme->updateAll(
array('Theme.name' => 'sky'),
array('Theme.user_id' => $id)
);
HTH, Paul
On Aug 21, 6:13 pm, taqman filler <[email protected]> wrote:
> I use updateAll to change theme name
> $this->Theme->updateAll(array('Theme.name' => $name),
> array('Theme.user_id' => $id));
> I got unknow column
> this sql
> UPDATE `themes` AS `Theme` SET `Theme`.`name` = sky WHERE
> `Theme`.`user_id` = 128
>
> thank
--
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