Re: crud application please help

Поиск
Список
Период
Сортировка
От Raymond O'Donnell
Тема Re: crud application please help
Дата
Msg-id 4DD0CEA2.5020001@iol.ie
обсуждение исходный текст
Ответ на crud application please help  (hatem gamal elzanaty <hatem@softpro.bz>)
Список pgsql-php
On 16/05/2011 03:19, hatem gamal elzanaty wrote:
> hi,
> can you please guide me in a crud application for one table that have
> auto increment serial number for each record can you please give what
> syntax do i have to enter new record without writing manually the id of
> the record through php connection to postgresql if you can send me an
> example for one table with two fields it would be more than enough i
> would appreciate if you gave me a link , book name , tutorial web site

Auto-incrementing columns, or SERIAL types [1]:

http://www.postgresql.org/docs/9.0/static/datatype-numeric.html#DATATYPE-SERIAL

Default values - look for the DEFAULT keyword:

http://www.postgresql.org/docs/9.0/static/sql-createtable.html

[1] Note that SERIAL isn't a real type, but just syntactic sugar that
creates a sequence and sets the column to pull from the sequence by
default. More on sequences:

http://www.postgresql.org/docs/9.0/static/sql-createsequence.html

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie

В списке pgsql-php по дате отправления:

Предыдущее
От: hatem gamal elzanaty
Дата:
Сообщение: crud application please help
Следующее
От: Yaz Kedoo
Дата:
Сообщение: pgsql-php@postgresql.org