php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13793 ibase_fetch_row function chokes on null column values
Submitted: 2001-10-22 18:15 UTC Modified: 2002-06-19 10:17 UTC
Votes:2
Avg. Score:4.5 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: smk at bigmediastudios dot com Assigned:
Status: Closed Package: InterBase related
PHP Version: 4.0.6 OS: Linux
Private report: No CVE-ID: None
 [2001-10-22 18:15 UTC] smk at bigmediastudios dot com
It seems that, if there is a NULL field at the end of a query string, or TWO or more NULL fields in the MIDDLE of the QUERY string, ibase_fetch_row just DROPS the nulls, and any column data that follows them. For exampe, if I have a table with the columns: FNAME, LNAME, MI, PREFIX, SUFFIX, DOB, SEX, PASSWORD . . . 
IF MI, PREFIX, and SUFFIX all allow NULL values, and all are null, a SELECT * on this table would only return TWO values: FNAME and LNAME. It would leave out the PASSWORD!

This is VERY BAD. It SHOULD return (like in any normal SQL query) null values for any null fields, and NOT skip or stop at any columns, just because the data is null.

So . . . I have to populate every field with a default null value (a space, or the word "null", for example), if I want to make sure not to miss column date when I do a SELECT statement using ibase_fetch_row.

If anyone knows a way around this, an explanation, or any other ideas, please post them.
   Thanks, Steve

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-04-03 20:36 UTC] daniela@php.net
Already fixed in CVS
 [2002-04-04 07:06 UTC] smk at bigmediastudios dot com
Glad to hear that it's fixed in the Concurrent Version System open-standard version. Can you notify me when this fix is rolled into a standard non-development version/update?

Thanks,
Steve
 [2002-06-18 18:21 UTC] erik at otalcirculation dot com
Has this bug really been fixed? I'm still seeing this behavior in version 4.1.2. Thanks

--erik
 [2002-06-19 01:24 UTC] mfischer@php.net
Current stable is 4.2.1, if it still doesn't work please try http://snaps.php.net/php4-latest.tar.gz
 [2002-06-19 10:09 UTC] erik at totalcirculation dot com
Upgraded to 4.2.1 and the problem goes away. Thanks.

--erik
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Thu Aug 11 02:05:45 2022 UTC