Commit 9ed0e6e8 authored by zYne's avatar zYne

--no commit message

--no commit message
parent f23b69f6
...@@ -677,8 +677,10 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable ...@@ -677,8 +677,10 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable
$q .= ' SET ' . implode(', ', $this->parts['set']); $q .= ' SET ' . implode(', ', $this->parts['set']);
} }
$string = $this->applyInheritance(); $string = $this->applyInheritance();
// apply inheritance to WHERE part
if ( ! empty($string)) { if ( ! empty($string)) {
$this->parts['where'][] = '(' . $string . ')'; $this->parts['where'][] = '(' . $string . ')';
} }
...@@ -694,7 +696,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable ...@@ -694,7 +696,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable
switch (strtolower($this->_conn->getName())) { switch (strtolower($this->_conn->getName())) {
case 'mysql': case 'mysql':
// mysql doesn't support LIMIT in subqueries // mysql doesn't support LIMIT in subqueries
$list = $this->_conn->execute($subquery, $params)->fetchAll(PDO::FETCH_COLUMN); $list = $this->_conn->execute($subquery, $params)->fetchAll(Doctrine::FETCH_COLUMN);
$subquery = implode(', ', $list); $subquery = implode(', ', $list);
break; break;
case 'pgsql': case 'pgsql':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment