I have two scripts: Export_data.php Process.php The export_data.php connects to oracle using ADOdb and then sends the data via $_POST to process.php and stores it in an array > $all_fields The number of records to process coming from export_data.php can number between 1 to 2000 records with lots of fields.
I need to set a variable or variables for the amount of records I can process at one time. So what I want is to be able to set a variable > $amount_process = 1000 in the process.php and then process 1000 records at a time, then do the next 1000 and so on until all records have processed. This is so the script does not time out. Then populate the records in two CSV files (like it does already in the process.php) and email two CSV files.
I want the script to work like this:
1) Export_data.php sends process.php 2000 records
2) Process.php would then process a set amount of records at a time > $amount_process = 1000 (example)
3) Then do the next 1000 records and echo it to the screen
.Processing record one <br />
.Processing record two <br />
.Etc… <br />
4) Then do the final 151 records
5) Write out all accounts updated to a csv file (like it does currently)
6) Write out all accounts created to a csv file (like it does currently)
7) Email both CSV files (like it does currently)
So what I basically need to do is to add one or two variables to set a $min and $max, or $amount_to_process and then refresh and finish the record set
My php is just not up to speed to be able to finish this, please if anyone is willing to help, I would appreciate it!
Thanks,
MSimonds