September 9th, 2000, 08:28 AM
Hi, I was wondering whether it would be possible to find out the value of a column of the latest insert and then select all the rows which have the same value in that, all in one query.
Unclear what I mean? Well, like this:
1. Find out value of column in latest entry
2. Select all rows with the same value as the latest entry
I know how to do this in two calls, but wouldn't it be possible (and faster) to to do it in one call?
September 9th, 2000, 11:55 AM
September 22nd, 2000, 11:25 AM
1. $lastinsert = mysql_insert_id();
2. select * from yourtablename where yourid = $lastinsert
Good Good Study
Day Day Up