j'ai une erreur de syntaxe et je ne trouve pas
pouvez vous m'aider
L'erreur
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '://www.TZG-EDI.com/WEBSITES/VISUBLGENERAL. ... 5317527381 ' at line 1
Voici mon code
<?php
move_uploaded_file ("$fich3","upload/emarges.txt");
echo "le fichier $fich3 est enregistré";
echo "<BR>";
$user = "xxx";
$password = "xxx";
$database = "xxx";
$host = "xxx";
$date = gmdate("Y-m-d");
$fp = fopen("upload/emarges.txt", "r");
while (!feof ($fp))
{
$enr = fgets($fp, 512);
echo "$enr <br>";
$cli = substr($enr, 0, 6);
$fordate = substr($enr, 7, 10);
$forrecep = substr($enr, 18, 6);
$forind = substr($enr, 25, 2);
$forurl = substr ($enr, 28, 238);
echo "$fordate $forrecep $forind <br>";
$si1 = " date like \"$fordate\" and recep = $forrecep and indice = $forind ";
$connect = mysql_connect($host, $user, $password) or die(mysql_error());
mysql_select_db($database);
$req = ' update histo set urlemarge = '.$forurl.' where date like '.$fordate.' and recep = '.$forrecep.' and indice = '.$forind.' ' ;
if (mysql_query($req)) {
echo " creation de $forurl ";
} else {
echo 'ERREUR:<br>'.mysql_error().'<br>'.$req;
}
}
fclose($fp);
?>