#35240 [Opn->Ver]: dbase module do not handle float field definitions
| From: | sniper@php.net | Date: | Wed, 16 Nov 2005 21:38:38 +0000 |
| Subject: | #35240 [Opn->Ver]: dbase module do not handle float field definitions | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-88320@lists.php.net to get a copy of this message | ||
ID: 35240
Updated by: sniper@php.net
Reported By: nicol dot hermann at gmx dot de
-Status: Open
+Status: Verified
Bug Type: dBase related
Operating System: *
PHP Version: 5CVS, 4CVS (2005-11-16) (cvs)
Previous Comments:
------------------------------------------------------------------------
[2005-11-16 21:16:39] nicol dot hermann at gmx dot de
I packed a small tar file which contains a dbf file and a php script
which shows the bug.
The tar could be downloaded from:
http://anwender.info/dbfbug.tar.gz
The php code:
<?php
$db = dbase_open('/tmp/dbffile.dbf', 0);
if ($db) {
$record_numbers = dbase_numrecords($db);
for ($i = 1; $i <= $record_numbers; $i++) {
$row = dbase_get_record_with_names($db, $i);
print_r($row);
}
}
?>
------------------------------------------------------------------------
[2005-11-16 14:45:41] nicol dot hermann at gmx dot de
Description:
------------
If i create a dbf file with the data type float (
http://www.clicketyclick.dk/databases/xbase/format/data_types.html)
the record and field do not appear when you query the dbf file with
dbase_get_record_with_names. As a side effect all other fields containg
0 values or nonsense
Reproduce code:
---------------
You could use the sample code of the function
dbase_get_record_with_names (Example 1) and do a print_r($row) within
the for loop.
Expected result:
----------------
I expect the same results like the data type number
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=35240&edit=1