note 86502 added to function.pg-fetch-all-columns

From: Date: Wed, 22 Oct 2008 12:56:43 +0000
Subject: note 86502 added to function.pg-fetch-all-columns
Groups: php.notes 
Request: Send a blank email to php-notes+get-145584@lists.php.net to get a copy of this message
php 4 equivalent: <?php $conn = pg_pconnect("dbname=publisher"); if (!$conn) { echo "An error occured.\n"; exit; } $result = pg_query($conn, "SELECT title, name, address FROM authors"); if (!$result) { echo "An error occured.\n"; exit; } // Get an array of all author names $arr = array(); while ($line = pg_fetch_array($result)) { array_push($arr, $line['name']); } var_dump($arr); ?> ---- Server IP: 87.124.35.190 Probable Submitter: 217.154.95.89 ---- Manual Page -- http://www.php.net/manual/en/function.pg-fetch-all-columns.php Edit -- https://master.php.net/note/edit/86502 Del: integrated -- https://master.php.net/note/delete/86502/integrated Del: useless -- https://master.php.net/note/delete/86502/useless Del: bad code -- https://master.php.net/note/delete/86502/bad+code Del: spam -- https://master.php.net/note/delete/86502/spam Del: non-english -- https://master.php.net/note/delete/86502/non-english Del: in docs -- https://master.php.net/note/delete/86502/in+docs Del: other reasons-- https://master.php.net/note/delete/86502 Reject -- https://master.php.net/note/reject/86502 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#145584) next »