On Wed, Apr 25, 2007 at 04:50:46PM +0200, pobox@xxxxxxxxxxxxx wrote: > Richard Huxton wrote: > >pobox@xxxxxxxxxxxxx wrote: > >>What other variable (which are sometimes there, sometimes not) reasons > >>there can be pg_connect to fail? > > > >What result-code/error do you get? What do your logs show? > > I have - > > $connection = pg_connect("$host $db $user $pass"); > > When I get the error it is because $connection is 'false'. > > Thought of using pg_result_error - but it seems applicable only to > queries (i.e. with pg_query or pg_execute). How can I get an error code? In the C interface it's called PQerrorMessage(). I'm sure PHP has an equivalent. Have a nice day, -- Martijn van Oosterhout <kleptog@xxxxxxxxx> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to litigate.
Attachment:
signature.asc
Description: Digital signature