From d466830722cfaa77eaf9b551de6a0f760af52b03 Mon Sep 17 00:00:00 2001 From: chtito Date: Mon, 6 Nov 2006 07:10:06 +0000 Subject: [PATCH] fixes for #218 and #219 --- lib/Doctrine/Query.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Doctrine/Query.php b/lib/Doctrine/Query.php index 11eb77fa9..da6f4cbec 100644 --- a/lib/Doctrine/Query.php +++ b/lib/Doctrine/Query.php @@ -218,6 +218,8 @@ class Doctrine_Query extends Doctrine_Hydrate implements Countable { if( ! empty($having)) $q .= ' HAVING ' . implode(' AND ',$having); + $params = array_merge($this->params, $params); + $a = $this->getConnection()->execute($q, $params)->fetch(PDO::FETCH_NUM); return $a[0]; } @@ -347,6 +349,8 @@ class Doctrine_Query extends Doctrine_Hydrate implements Countable { $parser->parse($args[0]); break; case 'where': + call_user_func_array(array($this, 'addWhere'), $args); + break; case 'having': case 'orderby': case 'groupby':