PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Database » DB » Bug #3500

DB->getOne and DB->getRow error executing query with params on Firebird 1.5.1

Details

Submitted2005-02-17 10:38 UTC
Fromcryo28 at rbcmail dot ru
Assigneddanielc
StatusClosed
PackageDB
PHP Version5.0.3
OSWindows 2000
Roadmaps(Not assigned)

Comments

[2005-02-17 10:38 UTC] cryo28 at rbcmail dot ru

Description:
------------
This code

$param = 1;
$one = $db->getOne('SELECT ID FROM TABLE WHERE ID=?', array($param));

$row = $db->getRow('SELECT ID, FIELD FROM TABLE WHERE ID=?', array($param));

on Firebird 1.5.1 and PHP 5.0.3 returns warnings:

d:\inet\php\PEAR\DB\ibase.php line 237 - ibase_fetch_row(): 21 is not a valid Firebird/InterBase result resource

d:\inet\php\PEAR\DB\ibase.php строка 260 - ibase_free_result(): 21 is not a valid Firebird/InterBase result resource

and $row = NULL, $one = NULL;

Expected result:
----------------
Expected result is a correct values returned by this functions - same as returned by queries:

$one = $db->getOne('SELECT ID FROM TABLE WHERE ID='.(int) $param);

$row = $db->getRow('SELECT ID, FIELD FROM TABLE WHERE ID='.(int) $param);