X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A1ED8DB36A for ; Sun, 30 Oct 2005 01:58:50 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 03968-09 for ; Sun, 30 Oct 2005 04:58:49 +0000 (GMT) Received: from vscan02.westnet.com.au (vscan02.westnet.com.au [203.10.1.132]) by svr1.postgresql.org (Postfix) with ESMTP id 2E6FBDB360 for ; Sun, 30 Oct 2005 01:58:48 -0300 (ADT) Received: from localhost (localhost.localdomain [127.0.0.1]) by localhost (Postfix) with ESMTP id 48012119B4C; Sun, 30 Oct 2005 12:58:47 +0800 (WST) Received: from vscan02.westnet.com.au ([127.0.0.1]) by localhost (vscan02.westnet.com.au [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 26599-09; Sun, 30 Oct 2005 12:58:47 +0800 (WST) Received: from [202.72.133.22] (dsl-202-72-133-22.wa.westnet.com.au [202.72.133.22]) by vscan02.westnet.com.au (Postfix) with ESMTP id DF463119301; Sun, 30 Oct 2005 12:58:46 +0800 (WST) Message-ID: <43645313.5070403@familyhealth.com.au> Date: Sun, 30 Oct 2005 12:58:59 +0800 From: Christopher Kings-Lynne User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Mag Gam Cc: pgsql-php@postgresql.org Subject: Re: Determining Errors References: <1cbd6f830510292017h6c7c8477w60e251ba8f2d3b94@mail.gmail.com> In-Reply-To: <1cbd6f830510292017h6c7c8477w60e251ba8f2d3b94@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.29 required=5 tests=[AWL=-0.273, SUBJECT_DRUG_GAP_P=0.563] X-Spam-Score: 0.29 X-Spam-Level: X-Archive-Number: 200510/48 X-Sequence-Number: 3316 Check example 36-1 at the bottom of this page: http://developer.postgresql.org/docs/postgres/plpgsql-control-structures.html#PLPGSQL-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