downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

dbase_numfields> <dbase_get_record_with_names
Last updated: Fri, 30 Oct 2009

view this page in

dbase_get_record

(PHP 4, PHP 5)

dbase_get_recordLiefert einen Datensatz aus einer Datenbank als indiziertes Array

Beschreibung

array dbase_get_record ( int $dbase_identifier , int $record_number )

Gibt einen Datensatz aus einer Datenbank als indiziertes Array zurück.

Parameter-Liste

dbase_identifier

Die Datenbank-Verbindungskennung, die von dbase_open() oder dbase_create() zurückgegeben wurde.

record_number

Der Index des Datensatzes

Rückgabewerte

Ein indiziertes Array mit dem Datensatz. Dieses Array enthält zusätzlich einen assoziativen Schlüssel namens deleted, der auf 1 gesetzt ist, wenn der Datensatz zum Löschen markiert wurde (siehe dbase_delete_record()).

Jedes Feld wird in den entsprechenden PHP-Typ umgewandelt, ausgenommen:

  • Datumsfelder werden als Zeichenkette zurückgegeben.
  • Ganzzahlen, die zu einem Überlauf geführt hätten (> 32 Bit), werden als Zeichenkette zurückgegeben.

Falls ein Fehler auftritt, gibt dbase_get_record() FALSE zurück.

Siehe auch



add a note add a note User Contributed Notes
dbase_get_record
webtestjira at nospam dot mytrashmail dot com
20-Dec-2006 05:21
Nowhere in the documentaiont explains that if the entire DBF file is lacking a record for one whole column, you will not get a blank entry in your result from dbase_get_record().  You must use dbase_get_record_with_names(), it is the only safe way to read dbase files in PHP 4.

For example, if you have a dbase file with 12 columns, but 3 of them contain no data in any record, then your array returned from dbase_get_record() will only have 9 sequential array keys and values, leaving you no way to figure out which are the missing columns.
06-Feb-2006 12:39
Take care with this! Strings are not binary safe using these procedures!!!

dbase_numfields> <dbase_get_record_with_names
Last updated: Fri, 30 Oct 2009
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites