Multiple queries dependent on each other
问题 I have two queries both dependent on each other, i.e. if first query is not executed the second shouldn't be executed, and the other way around if second can't be executed the first shouldn't be executed. INSERT INTO `table` VALUES (1,2,3) UPDATE `otherTable` SET `val1`=1 WHERE `id`=$idOfInsert ON DUPLICATE KEY UPDATE is not the answer. I tried using mysqli::multi_query but as it turned out it executes the first even though the second can't be executed (it stops on error). How can I achieve