Re: getting pg_connect error?
| From: | Cornelia Boenigk | Date: | Sun, 06 Apr 2003 20:05:12 +0000 |
| Subject: | Re: getting pg_connect error? | ||
| References: | 1 2 3 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-26870@lists.php.net to get a copy of this message | ||
Hi Andrew
> You're right. That was a typo in the newsgroup, but pg_last_error()
> still doesn't work because $rc is boolean, not a resouce connection
type.
If your connection to the database server fails you cannot get any
error-message from the server ;-)
function open()
{
$rc = @pg_connect("db=wishiwhereusingmysql");
if (!$rc)
{
echo "Connection failed";
}
else
{
return ($rc);
}
}
Regards
Conni