Let $query be empty to count the whole table
authorChuck Hagenbuch <chuck@horde.org>
Thu, 3 Sep 2009 03:08:30 +0000 (23:08 -0400)
committerChuck Hagenbuch <chuck@horde.org>
Thu, 3 Sep 2009 03:08:30 +0000 (23:08 -0400)
framework/Rdo/lib/Horde/Rdo/Mapper.php

index 887594d..ac15e69 100644 (file)
@@ -292,7 +292,7 @@ abstract class Horde_Rdo_Mapper implements Countable
      *
      * @return integer All objects matching $query.
      */
-    public function count($query)
+    public function count($query = null)
     {
         $query = Horde_Rdo_Query::create($query, $this);
         $query->setFields('COUNT(*)')