Il y a plusieurs erreurs ; si tu indentais correctement ton code comme je l'ai fait, tu t'en serais aperçu !
D'abord dans la requête, puisqu'on est sur le forum MySQL.
Ce n'est pas ceci qu'il faut écrire :
WHERE (type=Information OR Meeting)
mais cela :
WHERE (type = Information OR type = Meeting)
Ensuite dans le code php, il manque un point-virgule à la fin de la définition de ta requête
1 2 3 4 5 6 7 8 9
| $q = "
SELECT COUNT(*) as inf
FROM activity
WHERE (type = Information OR type = Meeting)
AND due_date >= '".$startdate_en."'
AND due_date <= '".$enddate_en."' ";
$db->query($q);
$db->next_record();
$inf = $db->f("inf"); |
Partager