I'm trying to find with the condition that the field type
has one of a group of selected values. The problem I'm facing is that when select only one item, like this:
$this->Ads->find('all', array(
'conditions' => array(
'type IN' => array('other');
)
);
CakePHP gives an SQL error:
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 '= ('other')' at line 1
Query looks like:
type IN = ('other')
which is wrong.
Is this a CakePHP bug or am I doing something wrong?
I am using CakePHP version: 2.4.2