zendframework/zf2 — pull request #2214 by coolmic (2012-08-21 19:27:59+00:00)
Title: [ZF2-479] Zend\Db\Sql : Handling of null value on query mode Execute

_The old pull request was from master, moved to a new branch_

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.