Home > Archive > PHP with PostgreSQL > October 2005 > Determining Errors









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Determining Errors
Mag Gam

2005-10-30, 3:25 am

Is there a way to avoid this error/warning message

Warning: pg_query(): Query failed: ERROR: duplicate key violates
unique constraint "category_name_key" in foo.php on line 12

I would like something like, this already exists, please retry.
Something simple like that....
Even a popup box would be nice when press 'submit' button.


TIA!

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Christopher Kings-Lynne

2005-10-30, 3:25 am

Check example 36-1 at the bottom of this page:

http://developer.postgresql.org/doc...-ERROR-TRAPPING

Chris

Mag Gam wrote:
> Is there a way to avoid this error/warning message
>
> Warning: pg_query(): Query failed: ERROR: duplicate key violates
> unique constraint "category_name_key" in foo.php on line 12
>
> I would like something like, this already exists, please retry.
> Something simple like that....
> Even a popup box would be nice when press 'submit' button.
>
>
> TIA!
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings


---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Mag Gam

2005-10-30, 9:23 am

Very nice!

Thanks, I think I can run with this.



On 10/29/05, Christopher Kings-Lynne < chriskl@familyhealth
.com.au> wrote:
> Check example 36-1 at the bottom of this page:
>
> http://developer.postgresql.org/doc...-ERROR-TRAPPING
>
> Chris
>
> Mag Gam wrote:
>


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com