Hi! I'm using MySQL database. I have to get records where a datetime field is null.
$result = fRecordSet::build('Socio', array('apellido~'=>$q,'fecha_baja='=>'0000-00-00 00:00:00'), array());
This statement give me this sql sentence:
SELECT socios.* FROM socios
WHERE socios.apellido LIKE '%mas%' AND socios.fecha_baja = NULL
ORDER BY socios.socio_id ASC
But it doesn't work, because it executes socios.fecha_baja = NULL and it would be socios.fecha_baja IS NULL, to be recognized by MySQL.
How could I fix it?
Thanks a lot!
Ral