Jump to content

csv to sql convert:how to evaluate CSV lines


esandra

Recommended Posts

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.