Hello,
I am wondering if it's possible in MySQL to combine SELECT and UPDATE statements in one query?
Thanks.
$result = mysql_query( "SELECT id, file FROM random_images
where city='$city' ORDER BY last_showed ASC limit 0, 1") or die(mysql_error());
list($lid, $file) = mysql_fetch_row($cats);
$update=mysql_query("UPDATE random_images SET last_showed='$time'
WHERE id='$lid'") or die(mysql_error());