Yeah, I get the same error as above with single quotes and the
following error with double quotes around my string variables (that's
what you meant right).
Parse error: syntax error, unexpected T_VARIABLE in C:\xampp\htdocs
\konimo\app\controllers\users_controller.php on line 111
Also, I noticed that the docs say execute() should be _execute() but
that does not seem to work at all. Do you know what that's about? I
have found mixed examples.
On Jan 27, 12:00 pm, "Samuel DeVore" <[EMAIL PROTECTED]> wrote:
> probably need to wrap your strings in quotes (single or double)
>
> Sam D
>
> On Jan 27, 2008 12:48 PM, matches <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > Hello,
>
> > I am getting a sql syntax error when I try the execute function. I
> > errors when I try to use what I think to be the right syntax any other
> > kind of experimental syntax ;) Anyway, this is what I have:
>
> > $this->User->execute("UPDATE users WHERE username = $username SET
> > friends_list = concat(friends_list, $friendName)");
>
> > I have also tried this:
>
> > $this->User->execute("UPDATE 'users' WHERE 'username' = $username SET
> > 'friends_list' = concat(friends_list, $friendName)");
>
> > Here is the error:
>
> > Query: UPDATE users WHERE username = joe SET friends_list =
> > concat(friends_list, Albert2640)
> > Warning: SQL Error: 1064: You have an error in your SQL syntax; check
> > the manual that corresponds to your MySQL server version for the right
> > syntax to use near 'WHERE username = joe SET friends_list =
> > concat(friends_list, Albert2640)' at line 1 in C:\xampp\htdocs\konimo
> > \cake\libs\model\datasources\dbo_source.php on line 440
>
> > Thanks for any help
>
> --
> --
> (the old fart) the advice is free, the lack of crankiness will cost you
>
> - its a fine line between a real question and an idiot
>
> http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/http://blog.samdevore.com/cakephp-pages/my-cake-wont-bake/http://blog.samdevore.com/cakephp-pages/i-cant-bake/
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---