#32239 [Opn->Fbk]: ibase_fetch_* can´t work with ibase_execute() result resource
| From: | sniper@php.net | Date: | Tue, 08 Mar 2005 23:37:39 +0000 |
| Subject: | #32239 [Opn->Fbk]: ibase_fetch_* can´t work with ibase_execute() result resource | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-77142@lists.php.net to get a copy of this message | ||
ID: 32239
Updated by: sniper@php.net
Reported By: j-pieper at web dot de
-Status: Open
+Status: Feedback
Bug Type: InterBase related
Operating System: Windows XP Prof.
PHP Version: 5.0.3
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2005-03-09 00:13:43] j-pieper at web dot de
Description:
------------
When I am using ibase_execute to execute an query i can´t use one of
the ibase_fetch_* functions. I always get the same error.
-- php.ini: --
extension=php_interbase.dll
-- Database: --
table: FOOBAR
------
| ID |
------
| 1 |
------
Reproduce code:
---------------
<?php
$link = ibase_connect('...', '...', '...');
$sql = "SELECT * FROM FOOBAR";
$query = ibase_prepare($sql);
$result = ibase_execute($query);
// Variant 1
$foo = ibase_fetch_assoc($result);
// Variant 2
$foo = ibase_fetch_object($result);
// Variant 3
$foo = ibase_fetch_row($result);
?>
Expected result:
----------------
Array
(
[0] => 1
)
Actual result:
--------------
Variant 1:
Warning: ibase_fetch_assoc(): 5 is not a valid Firebird/InterBase
result resource
Variant 2:
Warning: ibase_fetch_object(): 5 is not a valid Firebird/InterBase
result resource in
Variant 3:
Warning: ibase_fetch_row(): 5 is not a valid Firebird/InterBase result
resource
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=32239&edit=1