Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

How can automatically post data to multiple table in php

currently Iam working in project where i need to post data in multiple tables from Csv file. my file has almost 40,000 rows. with 24 column where by I have to insert into Database with 8 tables. the current challenge Am facing now is to insert foreign key of the same value remaining the same to other side unless the value change. forexample. in one table i have region table and District table, when i set let say region with id=1, should be 1 to foreign key side district until, i move to other district.

Currently my code is sending data to all table as well, issue comes to be worth when i insert region and affect district table with different foreign ids for the very same region.

Comments