#35240 [Fbk->Opn]: dbase module do not handle float field definitions
| From: | nicol dot hermann at gmx dot de | Date: | Wed, 16 Nov 2005 20:16:40 +0000 |
| Subject: | #35240 [Fbk->Opn]: dbase module do not handle float field definitions | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-88314@lists.php.net to get a copy of this message | ||
ID: 35240
User updated by: nicol dot hermann at gmx dot de
Reported By: nicol dot hermann at gmx dot de
-Status: Feedback
+Status: Open
Bug Type: dBase related
Operating System: Linux
PHP Version: 4.4.1
New Comment:
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);
}
}
?>
Previous Comments:
------------------------------------------------------------------------
[2005-11-16 15:16:59] sniper@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.
A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc.
If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.
------------------------------------------------------------------------
[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