You're part way there: SELECT COUNT(matches) FROM table GROUP BY matches; ----- Original Message ----- From: Jason Soza <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, April 16, 2002 5:49 PM Subject: [PHP] Displaying Results
Suppose I want a script that goes into a table, looks up all records in a given field, and groups and displays the results like so: match1 (1) match2 (5) match3 (6) So basically it looked at the field 'matches' and found a total of 12 records, 1 record for match1, 5 records for match2, and 6 records for match3. It would also be handy for the output to be a link so when you clicked on it, it would pass a query on to the database querying for just that particular field, like: SELECT * FROM table WHERE match="match1" Can someone point me in the right direction for this? Or show me an example script that would accomplish this? Any help would be great. Thanks a lot! Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php