★ wanayoo — archive 1999 http://www.php.net/manual/function.dbase-get-record.phpNouvelle recherche | Portail wanayoo

PHP Home Page

Manual Table of Contents
Up to dBase
Quick Reference
German version of this pageJapanese version of this pageItalian version of this pageFrench version of this pageHungarian version of this page
dBase
* dbase_create
* dbase_open
* dbase_close
* dbase_pack
* dbase_add_record
* dbase_replace_record
* dbase_delete_record
* dbase_get_record
* dbase_get_record_with_names
* dbase_numfields
* dbase_numrecords
Manual: dbase_get_record
View the source code for this pageSearch the site



Previous page
 dbase_delete_record
 Updated
Sat, 12 Aug 2000
dbase_get_record_with_names 
Next page


dbase_get_record

(PHP3 , PHP4 )

dbase_get_record -- Gets a record from a dBase database

Description

array dbase_get_record (int dbase_identifier, int record)

Returns the data from record in an array. The array is indexed starting at 0, and includes an associative member named 'deleted' which is set to 1 if the record has been marked for deletion (see dbase_delete_record().

Each field is converted to the appropriate PHP type. (Dates are left as strings.)


User Contributed Notes: dbase_get_record


elanor@universalmail.com
13-Sep-1999 11:50
Is there any easy way to do following: (It works, an example for you...)
My file $dbname="/tmp/test.php3" contains 3 fields: named "code", "f1",f2"
My function is:
if ( !$fp = dbase_open($dbname,0) ) {
echo "Cannot open $dbname\n";
exit;
}
$nr = dbase_numrecords($fp); // Number of records.
for ($i=1; $i <= $nr; $i++) { // From 1 to $nr as you know.
$temp = dbase_get_record($fp,$i);
if ( chop($temp[0]) == $key ) { // $key comes from FORM via WEB
echo "$temp[0] : $temp[1] , $temp[2]
";
dbase_close($fp);
exit;
}
}
It checkes that $key exists in field code of test.dbf, if so print.



woocy@163.net
14-Jul-2000 11:19
After I get the record in FoxBase(.dbf),
the field in logic cannot respon a real result. All result is '0'. How can I resolve it.



fuxiaolong@mailx.tsginhua.edu.cn
16-Jul-2000 01:56
Under Windows NT or Windows 2000,when I
use dbase_add_record(),it will create error-"php.exe creat error,will be closed by windows".How can resolve it?



 About Notes


Previous page
 dbase_delete_record
 Updated
Sat, 12 Aug 2000
dbase_get_record_with_names 
Next page





Who's responsible for this?
Top of this page

Site
Hosting:



Located in
United States
Elements of this website are subject to copyright.
Questions about installing or using PHP should be directed to one of the mailing lists.
Only questions about the website should be directed to webmaster@php.net.