I am import from a CSV to Mysql, every works fines the only problem is i have to convert normal date to mysql date. can anyone help.
$row = 1;
if (($handle = fopen($_FILES['Filedata']['tmp_name'], "r")) !== FALSE) {
while (($data = fgetcsv($handle, 10000, ";")) !== FALSE) {
if($row != 1) {
$sql = sprintf('INSERT INTO %s ('.$fields.') VALUES ("%s")',
'flight_tbl',
implode('", "', array_map('mysql_escape_string', $data))
);
mysql_query("SET names latin5");
mysql_query($sql);
}
$row++;
Do you mean this?