I need to be able to verify that a PG connection is valid BEFORE I try to use it!
How to do?
Example:
$connect=pg_connect("dbname=$db user=$dblogin password=$dbpass");
if (somewaytovalidate($connect))
{
pg_exec($connect, $query);
}
else
{
echo "Some error\n";
}
...
Any takers?
I tried pg_host - and there must be a bug in that function ~ php 4.0pl2, because then I get NO RESULTS on a page that otherwise works. ("this document contains no data...")