php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5202 ibase_fetch_row and ibase_fetch_object doesn't work
Submitted: 2000-06-23 11:22 UTC Modified: 2000-06-28 09:39 UTC
From: petr dot husak at meiller dot com Assigned:
Status: Closed Package: Other
PHP Version: 4.0.0 Release OS: Linux RedHat6.2 kernel 2.4.0-tes
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: petr dot husak at meiller dot com
New email:
PHP Version: OS:

 

 [2000-06-23 11:22 UTC] petr dot husak at meiller dot com
I use interbase6.0 superserver edition. Here is example:


$id=ibase_connect("localhost:/var/interbase/web.gdb","sysdba","masterkey");

$q=ibase_prepare($id,"select * from tuser");

$rs=ibase_execute($q);


$row=ibase_fetch_row($rs);
echo ibase_num_field($rs)."<br>\n";
echo gettype($row)."<br>\n";


This script returns 8 which is correct and boolean which is not excepted. I am not able to get returned values from the query. The same problem is with function ibase_fetch_object(). Query works well in isql.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-06-24 02:11 UTC] jah at cvs dot php dot net
When the result of ibase_fetch_row or ibase_fetch_object is boolean, it
means that it is in fact FALSE and your query for some reason did not return
any rows (is this really the actual query you sent to your database server?).
It might seem strange that ibase_num_fields still returns a value, but that's
what InterBase server itself returns, it informs how many fields there would be
in a result set and doesn't care whether there are any rows or not.

So, check your query once again and please inform about the results.
 [2000-06-24 02:55 UTC] jah at cvs dot php dot net
Slight correction, FALSE is returned when the query couldn't be executed,
TRUE when it went ok but wasn't select.

By the way, why are you using ibase_prepare and ibase_execute instead
of ibase_query? It doesn't make any sense if are not using parameter
placeholders in your query, and seems to even cause a segfault that I must
either fix or make ibase_prepare complain about.
 [2000-06-28 02:39 UTC] petr dot husak at meiller dot com
I am sorry it was my mistake, I forgot to commit new values.
Everything works well.
Petr Husak
 [2000-06-28 09:39 UTC] jah at cvs dot php dot net
User admits own mistake.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 17:01:29 2024 UTC