I'm trying to get the number of columns from a table :
$query = "select count(column_name) from information_schema.columns where table_name = '".$tableName."'";
$columns = pg_query($query);
echo $columns;
but instead of number I get a mysterious Resource id #61.
Converting to other types like string or int doesn't help.
$result = pg_query($conn, "SELECT author, email FROM authors");as per the manual php.net/manual/en/function.pg-query.php