mysql count bizarre :(
Posté : 06 juin 2010, 01:16
Bonjour.
J'ai une commande toute bête :
Je fait la même chose mais avec un count :
Pourquoi ?
Merci a vous.
J'ai une commande toute bête :
SELECT rayons_filtres.id_rayon
FROM `rayons_filtres`
WHERE (
`rayons_filtres`.`id_filtre` = '6'
XOR `rayons_filtres`.`id_filtre` = '7'
XOR `rayons_filtres`.`id_filtre` = '7'
)
GROUP BY id_filtre
ORDER BY `rayons_filtres`.`id_filtre` ASC
LIMIT 0 , 30
J'obtiens 1 seul résultat, le calcul est bon.Je fait la même chose mais avec un count :
SELECT COUNT( rayons_filtres.id_rayon ) AS nbr
FROM `rayons_filtres`
WHERE (
`rayons_filtres`.`id_filtre` = '6'
XOR `rayons_filtres`.`id_filtre` = '7'
XOR `rayons_filtres`.`id_filtre` = '7'
)
GROUP BY id_filtre
ORDER BY `rayons_filtres`.`id_filtre` ASC
LIMIT 0 , 30
J'obtien nbr = 2 ????Pourquoi ?
Merci a vous.