I want to display the logid and the total count of each logid ... how do I display the actual count number.
Here's my code ...
<?php
include("dbinfo.inc.php");
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query = "SELECT COUNT(logid) as login_count, logid FROM usercount GROUP BY logid ASC";
$result=mysql_query($query);
$num=mysql_numrows($result);
$i=0;
echo "<table border=\"2\" align=\"center\"><tr valign=\"middle\" align=\"center\"><td bgcolor=\"#c0c0c0\"><font size=2><b>UserID</b></td><td bgcolor=\"#c0c0c0\"><font size=2><b>Time of Login</b></td></tr>";
while ($i < $num) {
$logid=mysql_result($result,$i,"logid");
$logdate=mysql_result($result,$i,"logdate");
echo "<tr align=\"left\" valign=\"top\"><td><font size=2>$logid</td><td><font size=2>$logdate</td><td><font size=2>login_count</td></tr>";
++$i;
}
echo "</table><br><font size=\"2\" face=|\"verdana,arial\"><br><br><br>";
?>