php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #4244 Incorrect dbase_get_record() behavior. Resulting array contains trash.
Submitted: 2000-04-26 04:37 UTC Modified: 2000-08-15 10:19 UTC
From: basil at farpost dot com Assigned:
Status: Closed Package: dBase related
PHP Version: 4.0 Release Candidate 1 OS: Linux 2.2.6
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: basil at farpost dot com
New email:
PHP Version: OS:

 

 [2000-04-26 04:37 UTC] basil at farpost dot com
This code works at PHP 3.0 without problems, but prints trash (every time different trash).

<html>
<head><title>Transfer from dBase to mySQL</title></head>
<body>
<?
$dbfid = dbase_open("goods.dbf", 0);
$rcount = dbase_numrecords($dbfid);
for ($i=1; $i <= $rcount; $i++) {
    $r = dbase_get_record($dbfid, $i);
    $name  = addslashes($r[0]);
    $size  = $r[1];
    $price = $r[2];
    $picfile = $r[3];
    echo "$name $size $price $picfile <br>";
}
dbase_close($dbfid);
?>
</body>
</html>

PHP4RC1 configured by
./configure --with-dbase --with-mysql --with-apache=../apache --enable-track-vars


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-24 16:19 UTC] derick@php.net
Please try the latest version (4.0.1pl2) and see if the problem still exists.
 [2000-08-15 10:19 UTC] waldschrott@php.net
Closed due to missing user feedback.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 07:01:28 2024 UTC