@@ -3,7 +3,6 @@ |
||
| 3 | 3 | namespace SimpleCrud\Queries\Mysql; |
| 4 | 4 | |
| 5 | 5 | use SimpleCrud\Queries\Query; |
| 6 | -use SimpleCrud\Table; |
|
| 7 | 6 | |
| 8 | 7 | /** |
| 9 | 8 | * Manages a database select count query. |
@@ -3,7 +3,6 @@ |
||
| 3 | 3 | namespace SimpleCrud\Queries\Mysql; |
| 4 | 4 | |
| 5 | 5 | use SimpleCrud\Queries\Query; |
| 6 | -use SimpleCrud\Table; |
|
| 7 | 6 | |
| 8 | 7 | |
| 9 | 8 | /** |
@@ -9,7 +9,7 @@ discard block |
||
| 9 | 9 | */ |
| 10 | 10 | class Select extends BaseSelect |
| 11 | 11 | { |
| 12 | - /** |
|
| 12 | + /** |
|
| 13 | 13 | * {@inheritdoc} |
| 14 | 14 | */ |
| 15 | 15 | protected static function buildFoundRows() |
@@ -21,19 +21,19 @@ discard block |
||
| 21 | 21 | * {@inheritdoc} |
| 22 | 22 | */ |
| 23 | 23 | protected function getFoundRows() { |
| 24 | - $query = $this->table->count(); |
|
| 24 | + $query = $this->table->count(); |
|
| 25 | 25 | |
| 26 | - $query->marks($this->marks); |
|
| 26 | + $query->marks($this->marks); |
|
| 27 | 27 | |
| 28 | - foreach ($this->where as $k => $where) { |
|
| 29 | - if ($k === 'or') { |
|
| 30 | - foreach ($where as $condition) { |
|
| 31 | - $query->orWhere($condition); |
|
| 32 | - } |
|
| 33 | - } else { |
|
| 34 | - $query->where($where); |
|
| 35 | - } |
|
| 36 | - } |
|
| 28 | + foreach ($this->where as $k => $where) { |
|
| 29 | + if ($k === 'or') { |
|
| 30 | + foreach ($where as $condition) { |
|
| 31 | + $query->orWhere($condition); |
|
| 32 | + } |
|
| 33 | + } else { |
|
| 34 | + $query->where($where); |
|
| 35 | + } |
|
| 36 | + } |
|
| 37 | 37 | |
| 38 | 38 | return $query->run(); |
| 39 | 39 | } |