zendframework/zf2 — pull request #2205 by coolmic (2012-08-20 14:19:16+00:00)
Title: Zend\Db\Sql : Handle null value when using execute mode

See : http://framework.zend.com/issues/browse/ZF2-479
There is no issue with prepared statement.

It also enhance the where method of Select, Update and Delete when using an array parameter.

$select->where(array(
'c1' => null,
'c2' => array(1, 2, 3),
new \Zend\Db\Sql\Predicate\IsNotNull('c3')
));

If the value is :
- null, then It will convert it to Predicate/IsNull,
- an array, it will convert it to Predicate/In
- instanceof Predicate/PredicateInterface, no conversion

Be careful if you use prepared statement, the prepared string will be something like

SELECT "table".* FROM "table" WHERE "c1" IS NULL AND "c2" IN (?, ?, ?) AND "c3" IS NOT NULL

There will be no placeholder for c1, and c2 must need a fixed number of values.