dennismonsewicz Posted March 19, 2008 Share Posted March 19, 2008 I was wondering if there is a way to count a number of entries in a SQL table? For example: If you have a field in the table named uploaded_username, and you want to count how many times a particular name shows up in that table. How would I achieve this? Sorry for the n00b question Quote Link to comment Share on other sites More sharing options...
Barand Posted March 19, 2008 Share Posted March 19, 2008 to count a single name SELECT COUNT(*) as total FROM tablename WHERE uploaded_username = '$username' to count all names SELECT uploaded_username, COUNT(*) as total FROM tablename GROUP BY uploaded_username Quote Link to comment Share on other sites More sharing options...
dennismonsewicz Posted March 19, 2008 Author Share Posted March 19, 2008 Thanks bud, I figured out the problem I was having! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.