Hi all im trying to upload a csv file into a database that already has a table created, im using the following code, but nothing seems to happen, no error messages..... can anyone spot a mistake??
Thanks
<?php
$dbhost = 'localhost';
$dbusername='xxxxxx';
$dbuserpass='xxxxxxx';
$dbname = 'test';
$link_id = mysql_connect($dbhost, $dbusername, $dbuserpass) or die("Unable to connect to MySQL.");
print "Connected to MySQL<br>";
mysql_select_db ('test') or die ('Could not Connect to database');
$query= 'LOAD DATA INFILE 'details.csv' replace INTO TABLE customers FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' ' or die("Unable to load data.");
print "Data Loaded Succesfully.";
$result = mysql_query($query) or die(mysql_error());
mysql_close($dbh);
?>