|
Home > Archive > PostgreSQL Discussion > January 2006 > help
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Paolo Ditto 2006-01-29, 3:23 am |
| Hi.
I would want do a php script to access my postgres database from remote host. I would like to know how I can do. Particularly, I would to know the default directory where my database is located so that to be able to call it with my php script.
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings
| |
| Andreas Kretschmer 2006-01-29, 3:23 am |
| Paolo Ditto <paolo_ditto@libero.it> schrieb:
> Hi.
> I would want do a php script to access my postgres database from
> remote host. I would like to know how I can do. Particularly, I would
1. you database must listen on TCP/IP and
2. the remote host needs privileges to connect to the DB
Read
http://www.postgresql.org/docs/curr...entication.html
3. with php, you connect to the db:
$db = pg_connect("host=server dbname=database user=db_user");
$result = pg_exec($db, $sql);
There are any other functions like pg_numrows($result),
pg_fetch_array($resu
lt, $i) and so on. Read the PHP-Doku.
> to know the default directory where my database is located so that to
> be able to call it with my php script.
Oh no, wrong. Access to the db with the php-functions, not directly in
the data directorys.
HTH, Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly." (unknow)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings
| |
| Raymond O'Donnell 2006-01-29, 1:23 pm |
| On 28 Jan 2006 at 17:38, Paolo Ditto wrote:
> I would want do a php script to access my postgres database from
> remote host. I would like to know how I can do. Particularly, I would
Are you looking for an administration tool? If so, have a look at
phpPgAdmin: http://phppgadmin.sourceforge.net/
--Ray.
-------------------------------------------------------------
Raymond O'Donnell http://www.galwaycathedral.org/recitals
rod@iol.ie Galway Cathedral Recitals
-------------------------------------------------------------
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend
|
|
|
|
|