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/