I have a php script that I need fixed. This should be a quick fix for anyone who is familiar with php and sql.
The file was working last year but now I when I try to run the cron that for this script the script does not populate (append and/or replace) the database tables according to date and country column. I am not getting an error message but it just isn't adding the data to the tables. (the script is attached)
In essence, the script is supposed to access the "New" email folder and identify specific emails by content. The emails include a link to a csv file which the script is supposed to grab and appropriately populate 3 tables. (I have attached a dummy email example)
Once collected, the email is moved from the "New" email folder to the "Cur" email folder.
The email identification part of the script is working and the emails are identified and subsequently moved to the "Cur" folder. Unfortunately, the data from the csv file is not put into the tables and the calculations for the averages are therefore not based on current data.
I am looking for some to fix this script and provide code explainations as seen in the example. I can not provide database access but you can run tests using the files provided (script, example email, and sample csv file).
The script was written in under 1 hour so I expect the fix should be done pretty quickly.