September 2001
Intermediate to advanced
768 pages
32h 45m
English
int odbc_num_fields(resource result) Displays the number of fields.
Returns:
Number of fields in a result set; -1 on error
Description:
Returns the number of fields in a result set. Useful if your SQL statement returns all fields from a database of unknown size.
Version:
Existing since version 3.0.6
Example:
$db = odbc_connect("DSN","user","pass");
$sql = "SELECT * FROM Products";
$result = odbc_exec($db, $sql);
echo odbc_num_fields($result);
|
Read now
Unlock full access