@@ 165-182 (lines=18) @@ | ||
162 | return $this; |
|
163 | } |
|
164 | ||
165 | public function fetch($table = null) |
|
166 | { |
|
167 | if ($table) { |
|
168 | $this->table($table); |
|
169 | } |
|
170 | ||
171 | $sql = $this->fetchStatment(); |
|
172 | ||
173 | $sql = $this->fetchStatmentExtra($sql); |
|
174 | ||
175 | $query = $this->query($sql, $this->bindings); |
|
176 | ||
177 | $result = $query->fetch(); |
|
178 | ||
179 | $this->rows = $query->rowCount(); |
|
180 | ||
181 | return $result; |
|
182 | } |
|
183 | ||
184 | public function fetchAll($table = null) |
|
185 | { |
|
@@ 184-201 (lines=18) @@ | ||
181 | return $result; |
|
182 | } |
|
183 | ||
184 | public function fetchAll($table = null) |
|
185 | { |
|
186 | if ($table) { |
|
187 | $this->table($table); |
|
188 | } |
|
189 | ||
190 | $sql = $this->fetchStatment(); |
|
191 | ||
192 | $sql = $this->fetchStatmentExtra($sql); |
|
193 | ||
194 | $query = $this->query($sql, $this->bindings); |
|
195 | ||
196 | $results = $query->fetchall(); |
|
197 | ||
198 | $this->rows = $query->rowCount(); |
|
199 | ||
200 | return $results; |
|
201 | } |
|
202 | ||
203 | private function fetchStatment() |
|
204 | { |