Skip site navigation (1) Skip section navigation (2)

capturing errors

From: Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>
To: pgsql-php(at)postgresql(dot)org
Subject: capturing errors
Date: 2010-01-29 16:06:03
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-php

I'm trying to capture the error from php to show an informative
message to the user but i haven't managed to get it...

i'm using pg_result_error_field() but when i print it i get nothing,
is there something i have to configure or what i'm doing bad.
attached a little php script for testing and here is the schema the
script is using (obviously the error i'm trying to catch here is
unique violation)
create table t1_fk1(col1 integer primary key);
insert into t1_fk1 values(1);
Jaime Casanova
Soporte y capacitación de PostgreSQL
Asesoría y desarrollo de sistemas
Guayaquil - Ecuador
Cel. +59387171157

Attachment: prueba.php
Description: application/x-php (1.1 KB)


pgsql-php by date

Next:From: Jaime CasanovaDate: 2010-01-29 16:11:01
Subject: Re: capturing errors
Previous:From: Jasen BettsDate: 2010-01-29 10:52:52
Subject: Re: problem with connection to remote server

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group