Re: getting pg_connect error?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux