SELECT * FROM my_table WHERE id NOT IN (1,2,3);
$query->where(array('id:!=' => 1));
$query->where(array('id:!=' => 2));
$query->where(array('id:!=' => 3));
I’m trying to emulate a MySQL statement like this:
SELECT * FROM my_table WHERE id NOT IN (1,2,3);
Is there an xPDO equivalent?
$criteria->where('id:NOT IN' => array(1,2,3));No idea tbh, but I am aware of a recent bug with sending a large number of values like this via PDO in general, and well, it’s just a bad practice in general if you have a large set of specific values.
And an added bonus question... Oracle has a limit of 500 of how many values can be specified in an "IN" condition like this... does MySQL too?