Here is the scenario:
I get an CSV file, which has data1, data2, data3, data4(Add, Update, Delete), data5 and there are like 90000 entries in the CSV file, first line gives description of column like
DATE AGE NAME STATUS(ADD, UPDATE, DELETE) TIME
1 01/02 23 Phil A 23:00:00
2 02/03 32 Erick D 12:00:00 3 09/07 36 Timmy U 11:00:00I need to parse through this CSV file and store data into the database and depending upon STATUS, I need to add, update or delete information from the database. I am doing so using PDO and prepared statements and bind parameters.
Few Questions, Q2 I have asked which would add meat to this summary and would be useful.
- After doing desired operations on database like ADD, DELETE and UPDATE depending upon the STATUS table, I need to get current snapshot of the MySQL Table(or database but am more concerned about Table right now) and send it to an FTP Server from PHP.
My Issues:
I am trying to update content of the database depending on STATUS but somehow it is not been updated, this issue has been discussed in Q2, listed above.
Also I want to get current snapshot or state of
MySQL Table
which I need to export to an FTP Server and I am not sure of what approach do I need to take to achieve my goal.
Hope question is clear here and would get some useful information.
Thanks.
Update: I have tried to look for other alternatives regarding the approach to get snapshot of Current State of Database, in my case MySQL, but have not found any which can be used. Google is giving me wierd answers and getting me into wrong direction, Is it really that hard to get snapshot of current database state and send it to FTP Server using PHP ?