I have two tables Production and Production_Detail. Production_Detail holds details of some order and has a foreign key to Production. When I insert a row into Production, auto-incrementing column sets the key for that row. I need that key so that it can be linked with the new Production_Detail rows that will be inserted after inserting the master row in Production.
Using php, I insert the data:
insert into Production Values ('','$producer_id','$order_date','$company_id','$emp_id');
I need to find that '' part so that it can be used for later quires.
No comments:
Post a Comment