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