(PHP 4 >= 4.0.6, PHP 5)
fbsql_list_fields — List FrontBase result fields
Retrieves information about the given table.
The database name.
The table name.
Un identificador de enlace FrontBase devuelto por fbsql_connect() o fbsql_pconnect().
Es opcional y si no se especifica, la función intentará encontrar un enlace abierto al servidor FrontBase y de no encontrarse ningún enlace abierto intentará crear uno como si fbsql_connect() fuese invocada sin parámetros.
Returns a result pointer which can be used with the fbsql_field_xxx functions, or FALSE on error.
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.
Example #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";;
}
?>
El resultado del ejemplo sería algo similar a:
field1 field2 field3 ...