I uploaded 2 images into the database and want to retrieve from the database by id... I dont know how to retrieve for the first ID. I can retrieve the second ID using :
$lastid = mysql_insert_id();
//declare where the image is from
$before = $row['image']; //want to retrieve first id
$after = $row['image']; //this can be get by the $lastid
///updated my codes
I declared like this :
$lastid = mysql_insert_id();
$pic = mysql_query("SELECT * FROM images WHERE id='$lastid'");
$row = mysql_fetch_assoc($pic);
//declare where the image is from
$before = $row['image'];
$after = $row['image'];
when I output the image, i got 2 last id