pg_num_fields
pg_num_fields
Returns the number of fields in a result
int **pg_num_fields** PgSql\Result $result
returns the number of fields
(columns) in the instance.
pg_num_fields``PgSql\Result
Opmerking: > This function used to be called .
pg_numfields
result
The number of fields (columns) in the result. On error, -1 is returned.
Voorbeeld: example
<?php
$result = pg_query($conn, "SELECT 1, 2");
$num = pg_num_fields($result);
echo $num . " field(s) returned.\n";
?>
2 field(s) returned.
pg_num_rows``pg_affected_rows