Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions csv2sql.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@
//If each tuple in CSV are not seperated by new line. replace \n in the below query the delimiting character which seperates two tuples in csv
// for more information about the query http://dev.mysql.com/doc/refman/5.1/en/load-data.html
mysqli_query($cons, '
LOAD DATA LOCAL INFILE "'.$file.'"
INTO TABLE '.$table.'
LOAD DATA LOCAL INFILE "HelpNow"
INTO TABLE 'HelpNow'
FIELDS TERMINATED by \',\'
LINES TERMINATED BY \'\n\'
')or die(mysql_error());

$result2=mysqli_query($cons,"select count(*) count from $table");
$result2=mysqli_query($cons,"select count(*) count from HelpNow");
$r2=mysqli_fetch_array($result2);
$count2=(int)$r2['count'];

Expand Down