On Feb 15, 4:28 am, websurfshop <[email protected]> wrote:
> I have found the most common mistake I make when I get SQL syntax
> errors like this, is that I have not properly escaped my "conditions"
> statement in my find.
>
> Something like so works.
>
> $conditions = "Kjv.bnum=$bnum AND Kjv.cnum=$cnum";
>         $verses = $this->find('list',
>                               array('fields'=>'Kjv.vnum',
>                               'conditions'=>array($conditions),
>                               'recursive'=>-1
>                               ));

what's this array($astring) business?

'conditions' => array('Model.field' => ....

AD

-- 
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

Reply via email to