Re: Error code

From: Bill Moran <wmoran(at)potentialtech(dot)com>
To: Gustavo Amarilla Santacruz <gusamasan(at)gmail(dot)com>
Cc: pgsql-php(at)postgresql(dot)org
Subject: Re: Error code
Date: 2009-09-22 13:38:15
Message-ID: 20090922093815.7b8ae05f.wmoran@potentialtech.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

In response to Gustavo Amarilla Santacruz <gusamasan(at)gmail(dot)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/

In response to

  • Re: Error code at 2009-09-22 13:17:21 from Gustavo Amarilla Santacruz

Responses

  • Re: Error code at 2009-09-22 14:20:11 from Gustavo Amarilla Santacruz

Browse pgsql-php by date

  From Date Subject
Next Message Gustavo Amarilla Santacruz 2009-09-22 14:20:11 Re: Error code
Previous Message Gustavo Amarilla Santacruz 2009-09-22 13:17:21 Re: Error code