cvs: php4 /pear/DB pgsql.php
| From: | Thomas V.V.Cox | Date: | Wed, 04 Apr 2001 22:55:10 +0000 |
| Subject: | cvs: php4 /pear/DB pgsql.php | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-4989@lists.php.net to get a copy of this message | ||
cox Wed Apr 4 15:55:10 2001 EDT
Modified files:
/php4/pear/DB pgsql.php
Log:
as the row counter starts with 0, last row is before numrows
Index: php4/pear/DB/pgsql.php
diff -u php4/pear/DB/pgsql.php:1.36 php4/pear/DB/pgsql.php:1.37
--- php4/pear/DB/pgsql.php:1.36 Mon Apr 2 20:33:58 2001
+++ php4/pear/DB/pgsql.php Wed Apr 4 15:55:09 2001
@@ -91,7 +91,7 @@
}
$connstr = 'host=' . $dsninfo['hostspec'] . ' port=' .
$port;
}
-
+
if (isset($dsninfo['database'])) {
$connstr .= ' dbname=' . $dsninfo['database'];
}
@@ -263,7 +263,7 @@
function fetchInto($result, &$row, $fetchmode, $rownum=null)
{
$rownum = ($rownum !== null) ? $rownum : $this->row[$result];
- if ($rownum > $this->num_rows[$result]) {
+ if ($rownum >= $this->num_rows[$result]) {
return null;
}
if ($fetchmode & DB_FETCHMODE_ASSOC) {