Fix for count() using postgresql with query

This commit is contained in:
Miles Lott 2003-10-19 18:34:45 +00:00
parent fe494abdc1
commit b2d20be441

View File

@ -496,12 +496,11 @@
while(list($f,$x) = each($this->stock_contact_fields)) while(list($f,$x) = each($this->stock_contact_fields))
{ {
$sql .= " UPPER($f) LIKE UPPER('%$query%') OR "; $sql .= " UPPER($f) LIKE UPPER('%$query%') OR ";
$sqlcount .= $sql; $sqlcount .= " UPPER($f) LIKE UPPER('%$query%') OR ";
} }
$_tmp = $sql; $sql = substr($sql,0,-3) . ') ' . $fand . $filtermethod . $ordermethod;
$sql = substr($_tmp,0,-3) . ') ' . $fand . $filtermethod . $ordermethod; $sqlcount = substr($sqlcount,0,-3) . ') ' . $fand . $filtermethod;
$sqlcount = substr($_tmp,0,-3) . ') ' . $fand . $filtermethod; unset($f); unset($x);
unset($_tmp); unset($f); unset($x);
} }
else else
{ {