Re: [GENERAL] Re:PostgreSQL and PHP

From: "sheila bel" <sheilabel(at)hotmail(dot)com>
To: jeff95350(at)yahoo(dot)com, pgsql-general(at)postgreSQL(dot)org
Subject: Re: [GENERAL] Re:PostgreSQL and PHP
Date: 2000-02-12 07:04:39
Message-ID: 20000212070439.86750.qmail@hotmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ed Loehr 2000-02-12 16:32:23 Re: [GENERAL] Re:PostgreSQL and PHP
Previous Message Jeff Davis 2000-02-12 05:20:45 Re: [GENERAL] Re:PostgreSQL and PHP