in the fuction, globalize the database connection, that will resolve your
issue. Unlike MySQL connections, PostgreSQL connections are not
automatically available in functions.
That's incorrect. I use mysql at work, and I still have to globalise a connection string to use it in a function.
As far as integrating this into PHP like it is with MySQL.. would be nice.
I prefer the mysql functions, they're a bit easier to use over the postgresql functions in php. Slight code changes, but it's annoying.
------------------------
Chris Smith
http://www.squiz.net