php-db | 2001011
Date: 01/08/01
- Next message: Dean Bennett: "Re: [PHP-DB] problem installing PHP3.0.16 or PHP4.0 with Sybase 11.9.2 and Apache 3.0.16 on RH 6.2"
- Previous message: Dave Carrera: "[PHP-DB] I have dropdown list working better now"
- In reply to: Greg Kelley: "[PHP-DB] php4.0.4 and Interbase - fetching records across files"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
----- Original Message -----
From: "Greg Kelley" <gkelley <email protected>>
To: <php-db <email protected>>
Sent: January 08, 2001 11:14 AM
Subject: [PHP-DB] php4.0.4 and Interbase - fetching records across files
I'm trying to fetch multiple records, one at a time (like I have done with
MySQL and PostgreSQL) by storing the result set id to a session id. Then I
recall the same php file using a Next Button and get the next record from
the result set. Interbase doesn't like this at all...
<--snip-->
I have found a solution to the sequential record fetch as follows:
if ($site != "Next") { <- This is true if the .php file was called from a
Next Button
$rcd = ibase_fetch_object($rslt);
$row = 1; <- first time thru set $row to 1
} else {
$nrow = 1;
while ($rcd = ibase_fetch_object($rslt))
{
if ($nrow == ($row + 1))
{
$row = $nrow;
break;
} else {
$nrow = ($nrow + 1);
}
}
}
I store $row to a session variable, then fetch records until I get the one
after the last one I selected.
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Dean Bennett: "Re: [PHP-DB] problem installing PHP3.0.16 or PHP4.0 with Sybase 11.9.2 and Apache 3.0.16 on RH 6.2"
- Previous message: Dave Carrera: "[PHP-DB] I have dropdown list working better now"
- In reply to: Greg Kelley: "[PHP-DB] php4.0.4 and Interbase - fetching records across files"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

