"fixed postgres problem reported on the user list: operator does not exist: character varying = integer"

This commit is contained in:
Ralf Becker 2008-10-22 10:42:30 +00:00
parent d76143310e
commit 15fa1c84f7

View File

@ -297,11 +297,11 @@ class infolog_so
switch ($filter) switch ($filter)
{ {
case 'upcoming': case 'upcoming':
return " AND info_startdate >= '$tomorrow'"; return " AND info_startdate >= $tomorrow";
case 'today': case 'today':
return " AND info_startdate < '$tomorrow'"; return " AND info_startdate < $tomorrow";
case 'overdue': case 'overdue':
return " AND (info_enddate != 0 AND info_enddate < '$tomorrow')"; return " AND (info_enddate != 0 AND info_enddate < $tomorrow)";
case 'date': case 'date':
if (!$today || !$tomorrow) if (!$today || !$tomorrow)
{ {
@ -315,7 +315,7 @@ class infolog_so
} }
return " AND ($today <= info_enddate AND info_enddate < $tomorrow)"; return " AND ($today <= info_enddate AND info_enddate < $tomorrow)";
case 'limit': case 'limit':
return " AND (info_modified >= '$today' OR NOT (info_status IN ('done','billed','cancelled')))"; return " AND (info_modified >= $today OR NOT (info_status IN ('done','billed','cancelled')))";
} }
return ''; return '';
} }