Tried searching for a solution to this (all morning) but to be honest am not really sure what to search for.
I'm loading data from a CSV file into mySQL - no problems there. However the data is in a really annoying format and I want to "rotate it" before inserting the data.
Let me explain with examples. Here's the CSV (well - a very simplified version):
1111,2222,3333,4444
aaaa,bbbb,cccc,dddd
AAAA,BBBB,CCCC,DDDD
This isn't too useful. What I am trying to get is a table in mySQL that looks like:
1111 : aaaa : AAAA
2222 : bbbb : BBBB
3333 : cccc : CCCC
4444 : dddd : DDDD
I am guessing that I need to cycle through the data from the CSV, as I am now, but then do something clever with the array before I insert data. It's that clever bit that has me stuck!
If anyone can point me in the direction of an example - or even suggest what I should be searching for this would be a great help.
Ta'