Re: query inside model
erikober,
I wonder if there is a syntax error higher up in the code. Getting
your function name returned as bad SQL is weird... but not unusual.
I've definitely seen it more than once in my pages.
Anyhoo... this is such a simple query, GO NATIVE! In you're Model,
try:
$this->find('all', array(
'conditions' => array('WorkPiece.work_id' => 3),
'order' => 'adorder'
);
Regards,
Don
On May 14, 7:09 am, erikober <upperho...@gmail.com> wrote:
> Bogdan, thanks for the reply.
>
> I agree...
> Probably should rethink all of it to avoid any custom queries.
> Still curious why it isn't working.
>
> Here is more info:
>
> $sql = "returnAdvertising"
> $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 'returnAdvertising' at line 1"
> $out = null
>
> [CORE/cake/libs/model/datasources/dbo_source.php, line 681]
>
> thanks.
--
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
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home