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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with count

Status
Not open for further replies.

snowboardr

Programmer
Feb 22, 2002
1,401
PH
I am trying to do a count in my ASP application and I am able to do this on a few:

This returns 16, and there are 16 records that mactch this criteria.
Code:
SELECT count(*) as UserCount,ureadstatus FROM users WHERE ureadstatus = 0 GROUP by ureadstatus

But when I do this it returns 1, and it should return 5 (> is the change)
Code:
SELECT count(*) as UserCount,ureadstatus FROM users WHERE ureadstatus > 0 GROUP by ureadstatus

When I do this select in MySQLfront (a gui program for mysql) it returns 5 rows with 1 in each row...


Regards,

Jason



 
I figured it out, it was the group by was not required for this... Yes MySQL front is great I have used it for years.

Site San Diego www.sitesd.com

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top