pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bill Moran <wmoran@potentialtech.com>
To: Gustavo Amarilla Santacruz <gusamasan@gmail.com>
Cc: pgsql-php@postgresql.org
Subject: Re: Error code
Date: Tue, 22 Sep 2009 09:38:15 -0400
Message-ID: <20090922093815.7b8ae05f.wmoran@potentialtech.com> (raw)
In-Reply-To: <e4ea2d810909220617s63921795nedc17fa61b7d49f9@mail.gmail.com>
References: <e4ea2d810909210756s547417d6x7ecfb1d8300623e8@mail.gmail.com>
	<4AB821BD.6070508@gmail.com>
	<e4ea2d810909220617s63921795nedc17fa61b7d49f9@mail.gmail.com>

In response to Gustavo Amarilla Santacruz <gusamasan@gmail.com>:

> Thank you, Chris.
> Now, I need to do this in PHP:
> 
> -------------------- CODE
> ---------------------------------------------------------------
> 
> $errorCode = pg_result_error_field($res1, PGSQL_DIAG_SQLSTATE) ;
> 
> if( $errorCode == UNIQUE_VIOLATION )

if ( $errorCode == '23505' )

-- 
Bill Moran
http://www.potentialtech.com
http://people.collaborativefusion.com/~wmoran/



view thread (7+ messages)  latest in thread

Message-ID: <20090922093815.7b8ae05f.wmoran@potentialtech.com>
Permalink:  ../20090922093815.7b8ae05f.wmoran@potentialtech.com/
Also on:    postgresql.org/message-id/20090922093815.7b8ae05f.wmoran@potentialtech.com

 · 

reply

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: wmoran@potentialtech.com, gusamasan@gmail.com
  Subject: Re: Error code
  In-Reply-To: <20090922093815.7b8ae05f.wmoran@potentialtech.com>
  References: <e4ea2d810909210756s547417d6x7ecfb1d8300623e8@mail.gmail.com> <4AB821BD.6070508@gmail.com> <e4ea2d810909220617s63921795nedc17fa61b7d49f9@mail.gmail.com> <20090922093815.7b8ae05f.wmoran@potentialtech.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