This is my query that I'm using:
SELECT COUNT(*), categoryName
FROM StuSelectCateg
WHERE depName = 'Admisiones' timeOut>= '$Date1'
AND timeOut < '$Date2'
GROUP BY categoryName
but it doesn't return any results.
This is my query that I'm using:
SELECT COUNT(*), categoryName
FROM StuSelectCateg
WHERE depName = 'Admisiones' timeOut>= '$Date1'
AND timeOut < '$Date2'
GROUP BY categoryName
but it doesn't return any results.
Change this line
where depName = 'Admisiones' timeOut>= '$Date1' and timeOut < '$Date2'
to
where depName = 'Admisiones' and timeOut>= '$Date1' and timeOut < '$Date2'
You are missing and
before timeOut