csv to sql convert:how to evaluate CSV lines
Posted: Thu Sep 30, 2010 11:37 pm
HI
I am very confused right now guys. I have no idea how to evaluate my upload script. This adds CSV lines into my phpmyadmin table and it works fine, but i want to make it more user friendly so users could simply `save as` an XLS file into a CSV file without making any adjustments. And so the program would do most of the work from there. So if my CSv file looks like this:
, ,, ,,,,,
some word, random, ,,,,
#Batch 312-313
312,John Smith, New Jersey,, //line 1
313, Ana White, California,, //line 2
#Batch 314-315
314, Greg Long, Mexico //line 3
315, Jane Snow, Texas,, //line 4
Prepared by:, Jack Brown, CPA
I need help on how to add only the four lines into the fields: `number`, `name`, `address`
How do i disregard any other things in the CSV except for words that should be on my database?
Thank you for your time, and have a nice day.
I am very confused right now guys. I have no idea how to evaluate my upload script. This adds CSV lines into my phpmyadmin table and it works fine, but i want to make it more user friendly so users could simply `save as` an XLS file into a CSV file without making any adjustments. And so the program would do most of the work from there. So if my CSv file looks like this:
, ,, ,,,,,
some word, random, ,,,,
#Batch 312-313
312,John Smith, New Jersey,, //line 1
313, Ana White, California,, //line 2
#Batch 314-315
314, Greg Long, Mexico //line 3
315, Jane Snow, Texas,, //line 4
Prepared by:, Jack Brown, CPA
I need help on how to add only the four lines into the fields: `number`, `name`, `address`
How do i disregard any other things in the CSV except for words that should be on my database?
Thank you for your time, and have a nice day.