getting pg_connect error?
| From: | Andrew Ziem | Date: | Sun, 06 Apr 2003 16:09:53 +0000 |
| Subject: | getting pg_connect error? | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-26862@lists.php.net to get a copy of this message | ||
How does one get the error message from a bad pg_connect()?
I do:
function open()
{
$rc = @pg_connect("db=wishiwhereusingmysql");
if (!rc)
{
return(pg_last_error($rc)); // HERE it's broken
}
else
{
return ($rc);
}
}
But pg_last_error() doesn't work because $rc is a boolean and not a resource specifier.
Andrew