Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

GROUP BY returns 0 records

Status
Not open for further replies.

Bubah

Programmer
Oct 10, 2002
2
CA
This query:

SELECT p.Path, p.Title, COUNT(s.ID) AS Total FROM Stats AS s, Paths AS p
WHERE s.ID=p.ID AND s.Stamp = '2002-10-03' GROUP BY Path,Title ORDER BY
Total DESC LIMIT 10

Returns 0 records. When I remove the COUNT(s.ID) and GROUP BY clause, it
works fine. Why can't I get the GROUP BY and COUNT to work. Is there a bug
in MySQL?

DB INFO:

DBMS Version: 3.23.46-nt
OLE DB Version: 02.00
Provider Name: MSDASQL.DLL
Provider Version: 02.60.6526.0
Provider Friendly Name: Microsoft OLE DB Provider for ODBC Drivers
Driver Name: myodbc.dll
Driver Version: 2.50.39
Driver ODBC Version: 02.50


Thanks.
 
I've tried COUNT(*) and still I get 0 records. No error, just no records.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top