count() fixed
This commit is contained in:
parent
1b0d2c78b2
commit
bb2a1312ed
@ -44,7 +44,7 @@ class Doctrine_Query extends Doctrine_Hydrate implements Countable {
|
||||
|
||||
private $relationStack = array();
|
||||
|
||||
private $distinct;
|
||||
private $isDistinct = false;
|
||||
/**
|
||||
* create
|
||||
* returns a new Doctrine_Query object
|
||||
@ -80,7 +80,7 @@ class Doctrine_Query extends Doctrine_Hydrate implements Countable {
|
||||
$where = $this->where;
|
||||
$having = $this->having;
|
||||
|
||||
$q = "SELECT COUNT(1) FROM ".$table->getTableName()." ";
|
||||
$q = "SELECT COUNT(DISTINCT ".$table->getTableName().'.'.$table->getIdentifier().") FROM ".$table->getTableName()." ";
|
||||
foreach($join as $j) {
|
||||
$q .= implode(" ",$j);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user