Code: Select all
$result = mysql_query ("SELECT keywords, COUNT(*) as num_of FROM searchlog GROUP BY keywords");
while ($row = mysql_fetch_array($result)){
echo "<tr><td width='70'>
<form method='post' action='index.php?page=a_searchlog&menu=blank&head=search log'>
<input type='hidden' name='keyword' value='" . $row['keywords'] ."'>
<input type='hidden' name='update' value='deletekeyword'>
<input type='submit' value='Delete'>
</form>
</td><td width='15' align='right'>" .$row['num_of'] . " </td><td> searches for <b>" . $row['keywords'] . ".</b></td></tr>";
}
mysql_free_result($result);I tried what I thought it would be, but it failed:
"WHERE num_of != 50" or "ORDER BY num_of DESC", but that produced errors.