|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32239 ibase_fetch_* can?t work with ibase_execute() result resource
Submitted: 2005-03-09 00:13 UTC Modified: 2005-03-09 14:33 UTC
From: j-pieper at web dot de Assigned:
Status: Closed Package: InterBase related
PHP Version: 5.0.3 OS: Windows XP Prof.
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: j-pieper at web dot de
New email:
PHP Version: OS:


 [2005-03-09 00:13 UTC] j-pieper at web dot de
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: --

-- Database: --

table: FOOBAR
| ID |
|  1 |

Reproduce code:

    $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:
    [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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-09 00:37 UTC]
Please try using this CVS snapshot:
For Windows:

 [2005-03-09 14:34 UTC] j-pieper at web dot de
I found the problem. I have to use ibase_prepare() [$query] for the ibase_fetch_* functions and not ibase_execute() [$result].

By the way:

In one of the comments the result resource of ibase_execute() is be used for ibase_fetch_row().
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 19 00:01:33 2024 UTC