Hi, How to import data to MySQL with a PHP program? I want to put some condition on the data that will be imported to the database; like I want to select the data (from CSV) of particular date only for column rcvd_date. I know pulling whole data in csv to the database table with "Load data Infile.." But I dont know how to put the WHERE condition. Pls guide. Thanks, Smruti.
Sounds like you need your PHP script to parse (read and understand) the data, and you put the date filter in a loop that sends the INSERTs to the DB?
You have to use temporary table for that purpose. If you need to guide you just hit me on skype. Regards
Just upload the entire thing and then use sql to delete the dates you don't want. DELETE FROM mytable WHERE month < 10 AND day < 20 DELETE FROM mytable WHERE month > 10 AND day > 22