这是我使用的查询:
SELECT COUNT(*), categoryName
FROM StuSelectCateg
WHERE depName = 'Admisiones' timeOut>= '$Date1'
AND timeOut < '$Date2'
GROUP BY categoryName
但它不会返回任何结果。
答案 0 :(得分:1)
更改此行
where depName = 'Admisiones' timeOut>= '$Date1' and timeOut < '$Date2'
到
where depName = 'Admisiones' and timeOut>= '$Date1' and timeOut < '$Date2'
and
timeOut
答案 1 :(得分:-2)
您的查询不正确且缺少AND
。请尝试以下查询
Select count(*), categoryName
from StuSelectCateg
where depName = 'Admisiones' and timeOut>= '$Date1'
and timeOut < '$Date2'
group by categoryName