Closed (fixed)
Project:
Google News sitemap
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
19 Apr 2009 at 14:57 UTC
Updated:
7 Aug 2009 at 20:00 UTC
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!