Oops, this is a more accurate count

This commit is contained in:
Miles Lott 2003-10-19 08:12:16 +00:00
parent c02c4f563e
commit 61bf56843f

View File

@ -509,15 +509,20 @@
$sqlcount = "SELECT COUNT(id) FROM $this->std_table " . $fwhere
. $filtermethod . ' ' . $ordermethod;
}
if($DEBUG) { echo '<br>' . $sql; }
if($DEBUG)
{
echo '<br>COUNT QUERY' . $sqlcount;
echo '<br>FULL QUERY' . $sql;
}
// $db2 = $this->db;
copyobj($this->db,$db2);
/* Perhaps it is more efficient to count records for this query, which is all we need here */
$this->db->query($sqlcount,__LINE__,__FILE__);
$this->db->next_record();
unset($sqlcount);
$this->total_records = $this->db->num_rows();
$this->total_records = $this->db->f(0);
if($start && $limit)
{