For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > December 2007 > Re: [PHP-DB] Accessing last inserted record in a PSQL Database table









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PHP-DB] Accessing last inserted record in a PSQL Database table
Chris

2007-11-26, 7:00 pm

kdealba@uaaan.mx wrote:
> I need to access the last inserted record in a postgresql database table
> from php. I connect to the db using pg_connect
> I construct the query string, and I use pg_query to send the query. I get
> the record inserted, of course. One of the fields,
> which is my primary key, is an autoincrement field. I need to fetch this
> value. Any idea? I would really apreciate your helping me.


select currval('sequence_name') as 'last_id';

--
Postgresql & php tutorials
http://www.designmagick.com/
Adooaebunbur71

2007-12-06, 1:34 am

Real adult videos for free!

Choose your video:
porn videos 8
adult movie storres
gay bear viedo
free addult sex videos
sex porn videeos
teens XXXXin gvideos
teen movie
gay spaking videos
gay porn videoo clips
gay por nvideos
free gay mvies
adultvideorentals
teen gir videos
teen move quotes
funny adult pitures
aisan porn videos
free gay teen vides
streaming adult vvideo
teens videoos
adult video forr sale
adult mvie database
adult home ade videos
por star gallery
japanees adult video
adultvideodownloads
gay bareback ivdeos
fee gay porn video clips
anime prn video
freegaysexvideos
teen booy video
porn ivdeos
audlt dvd movie
smple teen video
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com