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
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: 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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Tue May 07 19:01:29 2024 UTC