[PHP] Re: Code for db connection errors

2002-08-15 Thread Pafo
why not: ?php $error[] = Connection to the database failed; $db = pg_connect(dbname=rap user=postgres) die (error(0)); function error ($code) { switch ($code) { case 0 : reportErrMsg($error[$code]); break; ... } } ? i think ive would have done something like that... but im

Re: [PHP] Re: Code for db connection errors

2002-08-15 Thread Andre Dubuc
Thanks Patrick, This looks good -- just what I needed to do the job! Regards, Andre On Thursday 15 August 2002 10:22 pm, Pafo wrote: why not: ?php $error[] = Connection to the database failed; $db = pg_connect(dbname=rap user=postgres) die (error(0)); function error ($code) {