When request is something like
$q = Mdl::model()->findAll('a = :a',array(':a'=>null));
, sql is
select * from mdl where a = NULL
, but must be
select * from mdl where a is NULL
.
Or there is any ways to use ‘is’ instead ‘=’ ?
When request is something like
$q = Mdl::model()->findAll('a = :a',array(':a'=>null));
, sql is
select * from mdl where a = NULL
, but must be
select * from mdl where a is NULL
.
Or there is any ways to use ‘is’ instead ‘=’ ?
$q = Mdl::model()->findAllByAttributes(array('a' => null));
But you could freely use ‘is’ as well.
Thanx, but ‘is’ is used only with null value