CSV import in database |
[eluser]René Tuin[/eluser]
Ey All, I have a problem, I must import a csv into a database only I don't know how. I have the following csv it contains students of a school. I use the CSVReader to put the records in a array, I have change Code: var $separator = ','; to var $separator = ';'; I get the following output(it's a part of the output). Code: Array Do someone know what happens with the data. Greetz
[eluser]umefarooq[/eluser]
hi i have tried this library earlier and working fine for me only you have to do a little effort is that you have to change your csv file first row according to you database table field name and pass this data array to your active record insert it will work fine
[eluser]René Tuin[/eluser]
I get that, only I already get trouble with the array. The array that I get is not good, he puts the data not right. If you look at my csv and my array above you see its wrong. Only I don't know what is happening with the csv. Greetz
[eluser]umefarooq[/eluser]
Hi i have created one example with database table just have look on it will work for you also just a simple example follow that http://www.webmasterdubai.com/csv.rar |
Welcome Guest, Not a member yet? Register Sign In |