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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Wed Feb 05 12:01:32 2025 UTC