hi there,
i am having some sort of trouble that i cant solve.
my sql table structure is this :
CREATE TABLE `search_terms` (
`term` varchar(255) default NULL,
`count` int(10) unsigned default '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1
Now my HTML and PHP code :
<font face="Verdana" size="1">
<table cellpadding=3 cellspacing=0 border=0>
<tr>
<th>Searched</th>
<th>Counts</th>
<tr>
</table>
<?php
$q = mysql_query("SELECT term,count, COUNT(count) AS 'total' FROM search_terms GROUP BY term ORDER BY count DESC LIMIT 10") or die(mysql_error());
$i=1;
while ($data = mysql_fetch_row($q)) {
?>
<table cellpadding=3 cellspacing=0 border=0>
<tr>
<td width="10"><?=$i?>.</td>
<td width="100"><?=$data[0]?></a></td>
<td width="10"><?=$data[1]?></td>
</tr>
</table>
<?php
$i++;
}
?>
</font>
The problem is my output,
Number 1.
In my firs row i have Cunt which is 100
Than from number 2 - 10
In my second row i have Search Term, and Cunt
( eg. 2. Cake - 90 )
How can i skip this count in first row output only search terms and counts for that row in mysql tabel?
Sorry for my bad english
Thank you,