Trying to SELECT via web server using PHP

From: "Shawn Pursley" <shawn(dot)pursley(at)service-transport(dot)com>
To: <pgsql-general(at)postgreSQL(dot)org>
Subject: Trying to SELECT via web server using PHP
Date: 1999-11-18 22:28:21
Message-ID: 00b701bf321d$6f313740$0301000a@go.servicetransport.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Greetings,

I've got pgsql running fine from the command line, but I'm having problems using PHP to do a select...suggestions?

<html>
<body>
<?php
$conn = pg_Connect("host=localhost port=5432 dbname=customers");
$result = pg_exec($conn, 'select * from employees');
echo $result;
pg_exec ($database, "commit");
pg_exec ($database, "end");
?>
</body>
</html>

results in:
Warning: PostgresSQL query failed: ERROR: employees: Permission denied. in /home/httpd/html/connect2.php3 on line 6

Warning: 0 is not a PostgresSQL link index in /home/httpd/html/connect2.php3 on line 8

Warning: 0 is not a PostgresSQL link index in /home/httpd/html/connect2.php3 on line 9

If I change the host, the thing really blows a gasket.

TIA,
Shawn Pursley(shawn(dot)pursley(at)service-transport(dot)com)
Network Administrator
Service Transport

Browse pgsql-general by date

  From Date Subject
Next Message Ed Loehr 1999-11-19 00:17:54 Re: [GENERAL] Re: sql question
Previous Message Herbert Liechti 1999-11-18 21:13:10 Re: [GENERAL] postmaster problem