Bug #13020: Error when reading data from Interbase 6 database

From: Date: Wed, 29 Aug 2001 09:41:58 +0000
Subject: Bug #13020: Error when reading data from Interbase 6 database
Groups: php.dev 
Request: Send a blank email to php-dev+get-64581@lists.php.net to get a copy of this message
From:             lpap@forthnet.gr
Operating system: Windows 2000
PHP version:      4.0.6
PHP Bug Type:     Reproducible crash
Bug description:  Error when reading data from Interbase 6 database 

Hi there, thanks for reading this.

I am running php4.0.6 under windows 2000, apache 1.3.x and as database I am
using Interbase 6.0 
Php is running perfectly.

The problem is when trying to read data in a while statement from the
database. In particular i have written :

$dbh = ibase_connect ($hostname, $DBUsername, $DBPassword);

 $stmt = "SELECT * FROM links";
 $sth = ibase_query ($dbh, $stmt);

 while ($row = ibase_fetch_object ($sth) ) //problem here
{ 
        echo $row->L_NAME;
 }

 ibase_close ($dbh);

Up to the while statement everything is fine. The connection is set
correctly and the query is ran.
The problem is when i say : while ($row = ibase_fetch_object ($sth) )

After the execution of that line i get :

Application error. Click ok to close, cancel to debug.

The interesting thing is that if i dont use a while but :
$row = ibase_fetch_object ($sth) ;
echo $row->L_NAME;

it works fine. 

I tried ibase_fetch_row and get the same error.

I would be very grateful if you could advise me on the matter.

Thank you very much.
Leon
-- 
Edit bug report at: http://bugs.php.net/?id=13020&edit=1



Thread (2 messages)

« previous php.dev (#64581) next »