From: Jaime Casanova <jcasanov@systemguards.com.ec>
To: pgsql-php@postgresql.org
Subject: capturing errors
Date: Fri, 29 Jan 2010 11:06:03 -0500
Message-ID: <3073cc9b1001290805w3d93cbcl906aabb8fe739a9d@mail.gmail.com> (raw)
Hi,
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);
"""
--
Atentamente,
Jaime Casanova
Soporte y capacitación de PostgreSQL
AsesorÃa y desarrollo de sistemas
Guayaquil - Ecuador
Cel. +59387171157
Attachments:
prueba.php (application/x-php, 1.1K) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: jcasanov@systemguards.com.ec
Subject: Re: capturing errors
In-Reply-To: <3073cc9b1001290805w3d93cbcl906aabb8fe739a9d@mail.gmail.com>
References: <3073cc9b1001290805w3d93cbcl906aabb8fe739a9d@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox