I have this code for the request:
$conditions[]=array('codiceBiblio IN (?)'=> $tot);
Where $ tot is a string (for example: 2345,5657,4565,5678).
In this case, the request will look like this:
SELECT [...] WHERE codiceBiblio IN ('2345,5657,4565,5678')
But he will return only the first record.
So it could be:
SELECT [...] WHERE codiceBiblio IN (2345,5657,4565,5678)
How can i do this?
How to create a request
I have this code for the request:
// General Query $conditions = array( 'editore LIKE' => "%$e%", 'titolo LIKE' => "%$t%" );
And I populate $ conditions with custom options, for example:
if ($anno&&$anno2) $conditions[] = array('anno BETWEEN ? AND ?' => array($anno,$anno2)); if (isset($menu)&&$menu!='') $conditions[]=array('classe LIKE' => "%$menu%");
source share