Bonjour,
j'ai le warning du titre avec ce code :
et si j'active l'affichage des erreurs mysqli avec mysqli_report(MYSQLI_REPORT_ALL);le warning est remplacé par ces 2 messages :
Code php : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9 $timestamp=time(); $ip=$_SERVER['REMOTE_ADDR']; $query ="select * from visites where ((".$timestamp." - timestamp <= 3600) and ip = ".$ip.")"; $result=mysqli_query($db,$query); $timestampmax=0; while ($ligne = mysqli_fetch_array($result)) { if ($ligne['timestamp']>$timestampmax) $timestampmax=$ligne['timestamp']; }Fatal error: Uncaught exception 'mysqli_sql_exception' with message '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 '.0.1)' at line 1' in C:\wamp\www\test\compteur.php on line 27qu'est-ce qu'il faut changer ?mysqli_sql_exception: 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 '.0.1)' at line 1 in C:\wamp\www\test\compteur.php on line 27
Partager