Working in phpMyAdmin for now:
order table strucure:
order
OrderID int(11) auto_increment CustomerID varchar(50) BillAddr varchar(200
I had the same issue, solution was do the the query at the same time. In other words first query and the second(last_insert_id) query should be executed at the same time. Not as two different execution.