Re: [GENERAL] Re:PostgreSQL and PHP

Поиск
Список
Период
Сортировка
От sheila bel
Тема Re: [GENERAL] Re:PostgreSQL and PHP
Дата
Msg-id 20000212070439.86750.qmail@hotmail.com
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: [GENERAL] Re:PostgreSQL and PHP
Следующее
От: Ed Loehr
Дата:
Сообщение: Re: [GENERAL] Re:PostgreSQL and PHP