if ($ctypes!='') {
$sql = "select n.nid,created from {node} n where status=1 and type in (".$ctypes.") and from_unixtime(created) >= date_sub(curdate(),interval 3 day) order by created desc";
}
else
{
$sql = "select n.nid,created from {node} n where status=1 and from_unixtime(created) >= date_sub(curdate(),interval 3 day) order by created desc";
}Time and date MySQL functions are not standard. Therefore it will fail on most SQL databases.
Could we move unixtime and three days ago to PHP.
So that the SQL query runs on every database.
Thanks a lot.
Comments
Comment #1
dave reidFixed in http://drupal.org/cvs?commit=242490. Thanks!