Author: david
Date: 2008-11-20 17:12:27 -0800 (Thu, 20 Nov 2008)
New Revision: 1612
Modified:
trunk/qubit/lib/QubitPager.class.php
Log:
Fix error in QubitPager::getCount() method - updated custom query to work with
PDO instead of Creole (symfony 1.2)
Modified: trunk/qubit/lib/QubitPager.class.php
===================================================================
--- trunk/qubit/lib/QubitPager.class.php 2008-11-20 23:00:52 UTC (rev
1611)
+++ trunk/qubit/lib/QubitPager.class.php 2008-11-21 01:12:27 UTC (rev
1612)
@@ -290,17 +290,11 @@
$countCriteria->setOffset(0);
$countCriteria->setLimit(0);
$countCriteria->clearOrderByColumns();
- $countCriteria->clearSelectColumns();
$countCriteria->clearGroupByColumns();
- $countCriteria->addSelectColumn('COUNT('.$this->tableName.'.id)');
- $results = BasePeer::doSelect($countCriteria);
- $results->next();
-
- if ($rowCount = $results->getInt(1)) {
- $this->totalRecordCount = $results->getInt(1);
- }
-
- return $this->totalRecordCount;
+ $stmt = BasePeer::doCount($countCriteria);
+ $count = $stmt->fetchColumn(0);
+
+ return $count;
}
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.ca/group/qubit-commits?hl=en
-~----------~----~----~----~------~----~------~--~---