Bug #13659 Updated: Boolean values from a dbase file are not read corectly
| From: | sniper@php.net | Date: | Sat, 13 Oct 2001 14:49:03 +0000 |
| Subject: | Bug #13659 Updated: Boolean values from a dbase file are not read corectly | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-67886@lists.php.net to get a copy of this message | ||
ID: 13659
Updated by: sniper
Reported By: adigeo@xs4all.nl
Old Status: Open
Status: Closed
Bug Type: dBase related
Operating System: Linux 2.4.x
PHP Version: 4.0.6
New Comment:
This is already fixed in CVS.
--Jani
Previous Comments:
------------------------------------------------------------------------
[2001-10-13 08:11:22] adigeo@xs4all.nl
Reading the boolean fields from a dbase database does not work.
I cannot submit a dbase file example but is easy to see whenever your dbase file has a boolean field
the returned field is equal with 0 regardless of the value of the dbase field.
I used a simple loop to read all records from the dbase file.
$dbf=dbase_open("/tmp/dbase_file", 0));
$num_rows=dbase_numrecords($dbf);
$nf = dbase_numfields($dbf);
while ( $j<$num_rows) {
$k=0;
$rec=dbase_get_record($dbf, $j);
while($k < $nf) {
print "$rec[$k],";
$k++;
}
$j++;
print "<br>";
}
Any boolean value read by dbase_get_record returns 0 which is wrong.
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=13659&edit=1