Hi, I have some data in Excel (CSV format) that looks like this:
Material........Component.......Quantity
123456.........aaa.....................1
123456.........bbb....................2
123456.........ccc.....................1
555555.........ddd....................1
My mySQL database rows look like this (I inherited this structure):
Material....Component1...Component2...Component3...Quantity1...Quantity2...Quantity3
123456..............................................................................................................................
555555..............................................................................................................................
What I'm trying to do is import the CSV and UPDATE the data into the relevant columns, so that it looks like:
Material....Component1...Component2...Component3...Quantity1...Quantity2...Quantity3
123456.....aaa....................bbb....................ccc.....................1...................2..................1
555555.....ddd........................................................................1........................................
Can someone please give some examples on how the PHP should look?
Thank you
But that aside, I think I can show you something that could translate the CSV into some kind of query. I'll see if I can come up with a code sample and I'll post back in a little while.