pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
crud application please help
2+ messages / 2 participants
[nested] [flat]

* crud application please help
@ 2011-05-16 02:19 hatem gamal elzanaty <hatem@softpro.bz>
  2011-05-16 07:13 ` Re: crud application please help Raymond O'Donnell <rod@iol.ie>
  0 siblings, 1 reply; 2+ messages in thread

From: hatem gamal elzanaty @ 2011-05-16 02:19 UTC (permalink / raw)
  To: pgsql-php

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 
,........ etc
thanks in advance

hatem gamal
201515604034
hatem@softpro.bz



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: crud application please help
  2011-05-16 02:19 crud application please help hatem gamal elzanaty <hatem@softpro.bz>
@ 2011-05-16 07:13 ` Raymond O'Donnell <rod@iol.ie>
  0 siblings, 0 replies; 2+ messages in thread

From: Raymond O'Donnell @ 2011-05-16 07:13 UTC (permalink / raw)
  To: hatem gamal elzanaty <hatem@softpro.bz>; +Cc: 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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2011-05-16 07:13 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-05-16 02:19 crud application please help hatem gamal elzanaty <hatem@softpro.bz>
2011-05-16 07:13 ` Raymond O'Donnell <rod@iol.ie>

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