par
artotal » 08 févr. 2007, 02:14
Bonjour,
j'ai créer un petit script de stat, sans prétention.
et je galère pour obtenir une plage de date, alors on m'a dit que ça fonctionnait, mais j'ai une erreur dans mysql
Code : Tout sélectionner
SELECT * FROM stats WHERE datevisite BETWEEN CURRENT_DATE - 1 MONTH AND CURRENT_DATE
l'erreur retourné correspond au mois:
Code : Tout sélectionner
#1064 - 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 'MONTH AND CURRENT_DATE LIMIT 0, 30' at line 1
j'ai un screen de ma table

Merci
Bonjour,
j'ai créer un petit script de stat, sans prétention.
et je galère pour obtenir une plage de date, alors on m'a dit que ça fonctionnait, mais j'ai une erreur dans mysql
[code]SELECT * FROM stats WHERE datevisite BETWEEN CURRENT_DATE - 1 MONTH AND CURRENT_DATE[/code]
l'erreur retourné correspond au mois:
[code]#1064 - 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 'MONTH AND CURRENT_DATE LIMIT 0, 30' at line 1 [/code]
j'ai un screen de ma table
[img]http://creatif-web.be/screen/date.PNG[/img]
Merci