|
@@ 128-134 (lines=7) @@
|
| 125 |
|
if ($query == true) { |
| 126 |
|
if (!isset($this->_queryCount)) { |
| 127 |
|
$this->_statement = $this->getConnection()->prepare($this->getCountSql()); |
| 128 |
|
foreach ($this->getFilterValues() as $key => $value) { |
| 129 |
|
if (is_null($value)) { |
| 130 |
|
$this->_statement->bindValue(":$key", null, PDO::PARAM_NULL); |
| 131 |
|
} else { |
| 132 |
|
$this->_statement->bindValue(":$key", $value, PDO::PARAM_STR); |
| 133 |
|
} |
| 134 |
|
} |
| 135 |
|
$this->_statement->execute(); |
| 136 |
|
$result = $this->_statement->fetch(PDO::FETCH_ASSOC); |
| 137 |
|
$this->_queryCount = $result['count']; |
|
@@ 459-465 (lines=7) @@
|
| 456 |
|
// return false; |
| 457 |
|
} |
| 458 |
|
$this->_statement = $this->getConnection()->prepare($this->getSql()); |
| 459 |
|
foreach ($this->getFilterValues() as $key => $value) { |
| 460 |
|
if (is_null($value)) { |
| 461 |
|
$this->_statement->bindValue(":$key", null, PDO::PARAM_NULL); |
| 462 |
|
} else { |
| 463 |
|
$this->_statement->bindValue(":$key", $value, PDO::PARAM_STR); |
| 464 |
|
} |
| 465 |
|
} |
| 466 |
|
$this->_statement->execute(); |
| 467 |
|
|
| 468 |
|
return $this->_items = $this->_statement->fetchAll(PDO::FETCH_CLASS, $this->_modelName); |