note 56822 added to function.dbase-get-record-with-names

From: Date: Thu, 15 Sep 2005 23:32:19 +0000
Subject: note 56822 added to function.dbase-get-record-with-names
Groups: php.notes 
Request: Send a blank email to php-notes+get-95254@lists.php.net to get a copy of this message
$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. ---- Manual Page -- http://www.php.net/manual/en/function.dbase-get-record-with-names.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+56822 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+56822&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+56822&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+56822&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+56822&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+56822&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+56822&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+56822&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+56822&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#95254) next »