Ive tested the following in PHPMYADIM and it returns each record and how many times it occurrs.
Yet when I try this on my webpage all i get is the number of records(gm).
Am I missing something?
-Dave
Code:
SELECT gm, COUNT(*) FROM league_ws GROUP BY gm ORDER BY 'COUNT(*)' DESC
Yet when I try this on my webpage all i get is the number of records(gm).
Code:
<?php
include 'dbinfo.php';
include 'dbconnect.php';
$query="SELECT gm, COUNT(*) FROM league_ws GROUP BY gm ORDER BY 'COUNT(*)' DESC";
$result=mysql_query($query) or die ("The Query has failed");
$num=mysql_numrows($result);
echo "$num\n";
mysql_close();
?>
Am I missing something?
-Dave