I get alot of data from different companies. I want to make a big JSON object which will contain all the data from all the companies togheter.
I am going to save the JSON object in a file instead of saving it in the DB.
My question is what would be best to do?
Lets say I get data from 50 different companies.
1. Have 1 single php-file for every company. open the json-file, insert the data and save it. Open next company-php-file, open the json-file and add this new data to it. Keep doing for 50 files.
2. Or create and insert all companies data in one single php-file. Hence only opening the file once per data update