php / mysql - need to find out id of last inserted row

Soldato
Joined
4 Jul 2004
Posts
2,647
Location
aberdeen
hi
how can ifind out the last id (or last value for the primary key in a table) for a query i just entered?
i want to do something like:
insert into reviews (id', 'intro') values (null, '$intro' etc)

then something like:
insert into games ('id', 'reviewid') values (null, '$idfrompreviousquery')

(i know those queries are not correct, just to give a basic idea)

cheers
 
Back
Top Bottom