From: | Chris <csmith(at)squiz(dot)net> |
---|---|
To: | "P(dot) Jourdan" <pippo(at)videotron(dot)ca>, pgsql-php(at)postgresql(dot)org |
Subject: | Re: sql command |
Date: | 2002-05-02 23:08:37 |
Message-ID: | 5.1.0.14.0.20020503090035.00aa8630@cooee.cybersydney.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-php |
Hi Phil,
>Could someone explain to me why sql commands work in php with pgsql?
?? Why wouldn't they? :P
>I have a curious situation where the author used sql commands like
>sqlconnect to access the database rather than pg-connect as well as other
>commands that are either psql or sql - I'm a litle confused here. This is
>in a .conf file:
>sqlconnect(array('server'=>'tester.videotron.ca','user'=>'mum',
> 'database'=>'mum','password'=>'123456' ) );
>I'm looking for the theory behind all this. :-)
>Thanks
It looks like the author wrote a function called 'sqlconnect' which takes
an array of data to (obviously) connect to the server.
The function would probably look something like this:
function sqlconnect($connectionarray) {
pg_connect("host=$connectionarray['server'] user=$connectionarray['user']
password=$connectionarray['password'] dbname=$connectionarray['database']");
}
(with more error checking and comments of course).
Do a grep on your code tree for 'function sqlconnect' and look at the file
involved.
It's just a small wrapper function for the full command :)
-----------------
Chris Smith
http://www.squiz.net/
From | Date | Subject | |
---|---|---|---|
Next Message | Rod Taylor | 2002-05-02 23:11:33 | Re: [PHP] sql commands |
Previous Message | Scott Marlowe | 2002-05-02 22:17:08 | Re: sql command |