[thelist] mySQL - limit by COUNT(*)?

R.Livsey R.Livsey at cache-22.co.uk
Wed Feb 5 22:41:19 CST 2003


Appologies if this is really easy, I've been awake for about 30 hours
now :o)

I swear I've done it before, I have a query where I have "COUNT(*) AS
hits" as part of it, but I only want to return results where hits are
greater than some value.

This is a cut down version of the query:

SELECT COUNT(*) AS hits FROM requests WHERE hits>10 GROUP BY request

I get 'unknown column hits' back from the db when trying that though :-/

Cheers.

--
R.Livsey
Incutio Web Developer
[ PHP | Perl | Java | C# ]
www.cache-22.co.uk
www.incutio.com





More information about the thelist mailing list