Jump to content

csv reader mysql problem


tecdesign

Recommended Posts

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

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.