Skip to content

Commit

Permalink
Trying to figure out what sql server is doing
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Dec 31, 2015
1 parent 1afee11 commit a52d795
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/ORM/Query.php
Expand Up @@ -723,13 +723,11 @@ protected function _performCount()
count($query->clause('union')) ||
$query->clause('having')
);
debug($complex);

if (!$complex) {
// Expression fields could have bound parameters.
foreach ($query->clause('select') as $field) {
if ($field instanceof ExpressionInterface) {
debug($field);
$complex = true;
break;
}
Expand All @@ -739,7 +737,7 @@ protected function _performCount()
if (!$complex && $this->_valueBinder !== null) {
$order = $this->clause('order');
$complex = $order === null ? false : $order->hasNestedExpression();
debug($complex);
var_dump($order);
}

$count = ['count' => $query->func()->count('*')];
Expand Down

0 comments on commit a52d795

Please sign in to comment.