note 56822 deleted from function.dbase-get-record-with-names by cmb
| From: | cmb@php.net | Date: | Fri, 28 Oct 2016 11:51:02 +0000 |
| Subject: | note 56822 deleted from function.dbase-get-record-with-names by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-206971@lists.php.net to get a copy of this message | ||
Note Submitter:
----
$foo_db = dbase_open ( 'foo.dbf', 0);
if ($foo_db) {
$rn = dbase_numrecords($foo_db);
echo "Record 0: ";
$test = dbase_get_record_with_names($foo_db, 0);
echo $test['deleted'] . " FOO BAR: '" . $test['BAR'] .
"'\n";
echo "Record n+1: ";
$test = dbase_get_record_with_names($foo_db, $rn+1);
echo $test['deleted'] . " FOO BAR: '" . $test['BAR'] .
"'\n";
}
Gives:
Record 0: 0 FOO BAR: ' '
Record n+1:
Warning: Tried to read bad record 30 in ./DisplayAccounts.php on line 21
FOO BAR: ''
0 is not an error record, it's just empty - and actually, not quite empty, as you see BAR got a
single space.