fbsql_list_fields
(PHP 4 >= 4.0.6, PHP 5)
fbsql_list_fields — List FrontBase result fields
Beschreibung
Retrieves information about the given table.
Parameter-Liste
- database_name
-
The database name.
- table_name
-
The table name.
- link_identifier
-
Eine von fbsql_connect() oder fbsql_pconnect() zurückgegebe FrontBase-Verbindung.
Wenn optional und nicht angegeben wird versucht eine bereits geöffnete FrontBase Verbindung gesucht, falls keine vorhanden ist wird versucht eine zu öffnen als ob fbsql_connect() ohne Parameter aufgerufen wurde
Rückgabewerte
Returns a result pointer which can be used with the fbsql_field_xxx functions, or FALSE on error.
Fehler/Exceptions
A string describing the error will be placed in $phperrmsg, and unless the function was called as @fbsql() then this error string will also be printed out.
Beispiele
Beispiel #1 fbsql_list_fields() example
<?php
$link = fbsql_connect('localhost', 'myname', 'secret');
$fields = fbsql_list_fields("database1", "table1", $link);
$columns = fbsql_num_fields($fields);
for ($i = 0; $i < $columns; $i++) {
echo fbsql_field_name($fields, $i) . "\n";;
}
?>
Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:
field1 field2 field3 ...
fbsql_list_fields
