I sure this is gonna be something easy but I have pulled what little hair out that I had left over the past couple of weeks... So some help would be appreciated..
Situation is as follows..
Auto sent to my server daily are approx 100 diff files all titled... *****-logfile.sql
Currently received as follows. Crude and no error checking added at this moment............. but thats another matter.
DELETE FROM `webuserdata` WHERE `NickName` = "OkiesPlace";
Insert into webuserdata (NickName, FileStatus, Correspondent, Period, FileName, Series, Files) values ('OkiesPlace','Sent','Enforcer','May 2008','CB30001-05 - Spears Britney - From The Bottom Of My Broken Heart.zip','CB','1');
These could contain from 1 to 5000 Insert lines.
At this moment, I manually insert each file and then delete.
What I would like to do is...
As file is uploaded it should be auto run to sql and when completed then be deleted.
I assume somehow I gotta include the connect code to the database and run the query.
Should there be an error on insert, which does occasionally happen. Would like it to write to an error file with the offending line number which caused the error.
All that sounds very easy HaHa
But certainly not been so for me.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
Bookmarks