Received: from nplex.globo.com (email.globo.com [200.208.9.53]) by postgresql.org (Postfix) with ESMTP id 3CB53475852 for ; Thu, 25 Apr 2002 15:59:16 -0400 (EDT) Received: by nplex.globo.com (5.1.061) id 3CC7A89700005A0F for pgsql-php@postgresql.org; Thu, 25 Apr 2002 17:00:06 -0300 Message-ID: <3CC7A89800004414@nplex.globo.com> Date: Thu, 25 Apr 2002 17:00:04 -0300 From: angelo.rigo@globo.com Subject: id field error To: pgsql-php@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable X-Archive-Number: 200204/93 X-Sequence-Number: 1117 Hi ! I=B4m doing my first publishing system for a last aquired boooks for a libr= ary. the problem begin in the id field, wich i choose to be primary key and uniq= ue. i could just insert data one time the others give me this error: Cannot insert a duplicate key into unique index biblioteca_pkey i use this piece of code below to insert the data: $query =3D "INSERT INTO biblioteca (id, autor, titulo, editora) values ('$i= d', '$autor', '$titulo', '$editora')"; $result =3D pg_exec($db, $query); may i can alter the id collumn and the query to insert the data anybody knows what exactly to do ? Thank=B4s =C2ngelo ________________________________________ A busca mais veloz e precisa da internet. Acesse agora: http://www.zoom.com= .br.