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

dave reid’s picture

Assigned: Unassigned » dave reid
Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.