Hi!
I'm trying to retrieve the id of one table A to insert into another table B. I cannot use last_insert_id() as i have not inserted anything into A. Any ideas on how to do this nicely?
$n = mysql_query("SELECT max(id) FROM tablename");
doesn't seem to work, nor does
$n = mysql_query("SELECT max(id) FROM tablename GROUP BY id");