Re: [GENERAL] Re:PostgreSQL and PHP - Mailing list pgsql-general

From sheila bel
Subject Re: [GENERAL] Re:PostgreSQL and PHP
Date
Msg-id 20000212070439.86750.qmail@hotmail.com
Whole thread Raw
List pgsql-general
Hi

Thank you for your message. I got the program to work
but I'm having a problem when I want to insert data into
a table that has type serial in it.

>This is the table :

agency(id serial, agency_name text, street_addr text, ...)

>This is what I did:

$result = pg_Exec($conn, "INSERT INTO agency VALUES
('nextval(\'agency_agencyid_seq\'),','$agency_name','$street_addr')");

>This is the error message I get:

Warning: PostgresSQL query failed: ERROR: Cannot insert a duplicate key into
a unique index in
/home/httpd/html/tests/T2.php3 on line 57

-Sheila
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com


pgsql-general by date:

Previous
From: Jeff Davis
Date:
Subject: Re: [GENERAL] Re:PostgreSQL and PHP
Next
From: Ed Loehr
Date:
Subject: Re: [GENERAL] Re:PostgreSQL and PHP