I have a CakePHP app that is being moved to Sql Server from MySql. There is one query that does not seem to transfer correctly:
$this->Model->find('all', array(
'conditions' => array(
'Model.column' => array(1, 2, 3)
)
)
);
When I use this syntax with mysql, it seems to 'unpack' the array correctly, and the query generated is something like
"...WHERE 'Model.column' IN (1, 2, 3)..."
When I use sql server, the query generated is
"...WHERE 'Model.column' IN 'Array'"...
which obviously generates an error. I posted this question on the CakePHP Google Group yesterday, but have not received a reponse, so I thought I would try SO. If anyone has any ideas/suggestions I would appreciate it.