| @@ 416-432 (lines=17) @@ | ||
| 413 | * |
|
| 414 | * @return array|false <p><strong>false</strong> on error</p> |
|
| 415 | */ |
|
| 416 | public function fetchArray($reset = false) |
|
| 417 | { |
|
| 418 | if ($reset === true) { |
|
| 419 | $this->reset(); |
|
| 420 | } |
|
| 421 | ||
| 422 | $row = \mysqli_fetch_assoc($this->_result); |
|
| 423 | if ($row) { |
|
| 424 | return $this->cast($row); |
|
| 425 | } |
|
| 426 | ||
| 427 | if ($row === null) { |
|
| 428 | return array(); |
|
| 429 | } |
|
| 430 | ||
| 431 | return false; |
|
| 432 | } |
|
| 433 | ||
| 434 | /** |
|
| 435 | * Fetch data as a key/value pair array. |
|
| @@ 482-498 (lines=17) @@ | ||
| 479 | * |
|
| 480 | * @return Arrayy|false <p><strong>false</strong> on error</p> |
|
| 481 | */ |
|
| 482 | public function fetchArrayy($reset = false) |
|
| 483 | { |
|
| 484 | if ($reset === true) { |
|
| 485 | $this->reset(); |
|
| 486 | } |
|
| 487 | ||
| 488 | $row = \mysqli_fetch_assoc($this->_result); |
|
| 489 | if ($row) { |
|
| 490 | return Arrayy::create($this->cast($row)); |
|
| 491 | } |
|
| 492 | ||
| 493 | if ($row === null) { |
|
| 494 | return Arrayy::create(); |
|
| 495 | } |
|
| 496 | ||
| 497 | return false; |
|
| 498 | } |
|
| 499 | ||
| 500 | /** |
|
| 501 | * Fetch a single column as string (or as 1-dimension array). |
|