making sql queries to postgresql
| From: | Tan Chee Leong | Date: | Mon, 11 Sep 2000 08:46:05 +0000 |
| Subject: | making sql queries to postgresql | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-2782@lists.php.net to get a copy of this message | ||
Thought I was a little too brief. In addition to below, "test" is the name of the
database and "test2" is a table in this database, "firstname" is a field of
"test2".
Tan Chee Leong <tcheele2@yahoo.com> wrote:
Hi,
I'm a newbie trying to tie up php and postgresql. However, I'm meeting with problems as
follow:
dbase.php3
<?php
$link = pg_connect ("","","","","test")
or die ("Could not connect");
pg_exec($link, "select firstname "."from test2 ");
$message = pg_errormessage($link);
print ("Connected successfully");
print $message;
pg_close ($link);
?>
However, upon activation, the following was the message I received:
Warning: PostgresSQL query failed: ERROR: test2: Permission denied. in
/home/httpd/html/cheeleong/dbase.php3 on line 4
Connected successfullyERROR: test2: Permission denied.
Seems like I have no problem with connection but I am not allowed to do a query. Appreciate your
help. Thanks.
Cheers,
Chee Leong
---------------------------------
Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!
---------------------------------
Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!