From: angelo.rigo@globo.com
To: pgsql-php@postgresql.org
Subject: id field error
Date: Thu, 25 Apr 2002 17:00:04 -0300
Message-ID: <3CC7A89800004414@nplex.globo.com> (raw)
Hi !
I´m doing my first publishing system for a last aquired boooks for a library.
the problem begin in the id field, wich i choose to be primary key and unique.
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 = "INSERT INTO biblioteca (id, autor, titulo, editora) values ('$id',
'$autor', '$titulo', '$editora')";
$result = 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´s
Ângelo
________________________________________
A busca mais veloz e precisa da internet. Acesse agora: http://www.zoom.com.br.
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: angelo.rigo@globo.com
Subject: Re: id field error
In-Reply-To: <3CC7A89800004414@nplex.globo.com>
References: <3CC7A89800004414@nplex.globo.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