|
@@ 627-640 (lines=14) @@
|
| 624 |
|
* @param bool|int $counter The row number in the result to fetch (false to fetch the next one) |
| 625 |
|
* @return array The contents of the row that was fetched |
| 626 |
|
*/ |
| 627 |
|
function smf_db_fetch_row($request, $counter = false) |
| 628 |
|
{ |
| 629 |
|
global $db_row_count; |
| 630 |
|
|
| 631 |
|
if ($counter !== false) |
| 632 |
|
return pg_fetch_row($request, $counter); |
| 633 |
|
|
| 634 |
|
// Reset the row counter... |
| 635 |
|
if (!isset($db_row_count[(int) $request])) |
| 636 |
|
$db_row_count[(int) $request] = 0; |
| 637 |
|
|
| 638 |
|
// Return the right row. |
| 639 |
|
return @pg_fetch_row($request, $db_row_count[(int) $request]++); |
| 640 |
|
} |
| 641 |
|
|
| 642 |
|
/** |
| 643 |
|
* Get an associative array |
|
@@ 649-662 (lines=14) @@
|
| 646 |
|
* @param int|bool $counter The row to get. If false, returns the next row. |
| 647 |
|
* @return array An associative array of row contents |
| 648 |
|
*/ |
| 649 |
|
function smf_db_fetch_assoc($request, $counter = false) |
| 650 |
|
{ |
| 651 |
|
global $db_row_count; |
| 652 |
|
|
| 653 |
|
if ($counter !== false) |
| 654 |
|
return pg_fetch_assoc($request, $counter); |
| 655 |
|
|
| 656 |
|
// Reset the row counter... |
| 657 |
|
if (!isset($db_row_count[(int) $request])) |
| 658 |
|
$db_row_count[(int) $request] = 0; |
| 659 |
|
|
| 660 |
|
// Return the right row. |
| 661 |
|
return @pg_fetch_assoc($request, $db_row_count[(int) $request]++); |
| 662 |
|
} |
| 663 |
|
|
| 664 |
|
/** |
| 665 |
|
* Reset the pointer... |