ID: 8297
Updated by: jmoore
Reported By: [EMAIL PROTECTED]
Old-Status: Feedback
Status: Closed
Bug Type: *Function Specific
Assigned To: 
Comments:

closed due to lack of feedback

Previous Comments:
---------------------------------------------------------------------------

[2000-12-16 15:25:39] [EMAIL PROTECTED]
Please provide a reduced code fragment (<15 lines) producing
this behaviour.
Put no database queries etc. in it to ensure that we can
reproduce it easily unless it is not 100% related to some db
(or similar) function.

---------------------------------------------------------------------------

[2000-12-16 13:10:43] [EMAIL PROTECTED]
<?
// PHP Version 4.0.3pl1
// dbase_get_record Function error
// ================
// Boolean value shows always 0
// run this test!
// same result with dbase_get_record_with_names!

$dbname = "c:/tmp/test.dbf";
// Datenbank-"Definitionen"
$def =
array(
array("Datum",       "D"),
array("Name",        "C",  50),
array("Alter",       "N",   3, 0),
array("Email",       "C", 128) ,
array("Mitglied", "L"),
);
// Generate table
dbase_create($dbname, $def);
// write two records
$db=dbase_open($dbname,2);
$record[0]='20001216';
$record[1]='Meier';
$record[2]=20;
$record[3]='[EMAIL PROTECTED]';
$record[4]='Y';
dbase_add_record ($db, $record);
$record[0]="20001217";
$record[1]="Meier";
$record[2]=20;
$record[3]='[EMAIL PROTECTED]';
$record[4]='N';
dbase_add_record ($db, $record);
dbase_close($db);
// open for read
$db=dbase_open($dbname,0);
$num=dbase_numrecords ($db);
echo "Number of rows: ".$num;
$nf  = dbase_numfields($db);
echo " Number of fields: ".$nf."<br>";
for ($recno=1; $recno<=$num; $recno++) {
$rec = dbase_get_record($db, $recno);
    for ($i=0; $i < $nf; $i++) {
    echo $rec[$i]."&nbsp;&nbsp;" ;
      if ($recno==1 && $i==4 ) echo "(=this Value should be -1!)";
    }
    echo "<br>";
}
dbase_close($db);

?>


---------------------------------------------------------------------------



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=8297&edit=2


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to