SELECT * FROM table1 A INNER JOIN table2 B ON A.foreign_key_field = B.foreign_key_field WHERE B.some_field = 1
SELECT LAST_INSERT_ID()
Last updated 2 years ago