Hi,
> upgrading my app to work with cake 1.2 rc3 on local dev machine and
> got strange issue.
>
> $queryt = $this->Section->execute('select * from sections;');
>
> produces error
>
> >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
> >'' at line 1 [CORE/cake/libs/model/datasources/dbo_source.php, line 521]
>
> >$sql = "execute"
> >$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 '' at line 1"
> >$out = null
> >Query: execute
>
> and so with every sql query via execute call. the syntax of sql is ok
> but still getting this error. everything worked fine in 1.1
>
> or may be this is due php or mysql configuration?
Well, you get this error because the execute() method no longer exists
in Cake 1.2. You have to use the query() method instead, or in your
example you could also use $this->Section->find('all');
Hope that helps!
--
Daniel Hofstetter
http://cakebaker.42dh.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---