PRE ?php $fields[] = Array ("autor", "Author"); $fields[] = Array ("jahr", "Year"); $fields[] = Array ("titel"," Title"); $row= 0; / / postgres needs a row counter other dbs might not while ($data = pg_fetch_object ($qu, $row)) {echo "----------\n"; reset ($fields); while (list (,$item) = each ($fields)): echo $item[1] .": ".$data - $item[0] ."\n"; endwhile; $row++;} echo "----------\n";? / PRE ?php pg_free_result ($qu); pg_close ($db_conn);?
예 1. Postgres fetch object