tecdesign Posted December 12, 2006 Share Posted December 12, 2006 I would like to read a csv file and upload the information into a database. I have started with the following code[code]$data = read_csv('transumm.csv','|');for ( $i = 0; $i < count($data); $i++ ){\\$sql = mysql_query("insert into transactions values (" for ( $u = 0; $u < count($data[$i]); $u++ ) { echo $data[$i][$u].' '; if($data[$i][$u] == end($data[$i])) { \\echo "); } }}echo '<p>'; [/code] Link to comment https://forums.phpfreaks.com/topic/30291-csv-reader-mysql-problem/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.