php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13659 Boolean values from a dbase file are not read corectly
Submitted: 2001-10-13 08:11 UTC Modified: 2001-10-13 10:49 UTC
From: adigeo at xs4all dot nl Assigned:
Status: Closed Package: dBase related
PHP Version: 4.0.6 OS: Linux 2.4.x
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: adigeo at xs4all dot nl
New email:
PHP Version: OS:

 

 [2001-10-13 08:11 UTC] adigeo at xs4all dot 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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-10-13 10:49 UTC] sniper@php.net
This is already fixed in CVS.

--Jani

 [2003-01-24 22:26 UTC] hbrindis at siscomx dot com
is there any way around in 4.0.6?

-Hector
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Mar 13 00:01:31 2025 UTC