I'm running apache 1.3.20 with php 4.0.6 and I'm trying to connect to
pgSQL 7.1.3(OS X 10.1.1).

I'm certain pgsql support is on..this is from my ./configure o/p:

checking for PostgreSQL support... yes

but this code:

$db = pg_connect("dbname=contacts user=www");
$query = "SELECT * FROM contacts";
$result = pg_exec($db, $query);
if (!$result) {printf ("ERROR"); exit;}
$row = pg_fetch_row ($result,0);
printf ("Last Name : %s<br>\n", $row[0]);
printf ("First Name: %s<br>\n", $row[1]);
printf ("Email     : %s<br>\n", $row[2]);
printf ("Phone     : %s<br>\n", $row[3]);

trips-up PHP..

you can try it at:


any ideas?

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to