From 6dd55013f993f6a26b670ed7cffa4f7d61578d3d Mon Sep 17 00:00:00 2001 From: Klas Lindfors Date: Wed, 13 Jun 2012 14:45:37 +0200 Subject: [PATCH] do $res->rowCount() instead of count($res->fetchAll()) should never be called after select, and will throw exceptions if you do --- ykval-db.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ykval-db.php b/ykval-db.php index 7d9d7e7..6e6bd9f 100644 --- a/ykval-db.php +++ b/ykval-db.php @@ -378,7 +378,7 @@ or false on failure. public function rowCount() { if($this->result) { - $count=count($this->result->fetchAll()); + $count=$this->result->rowCount(); $this->result->closeCursor(); return $count; } else {