waturl
01-26-2007, 12:15 PM
Hello,
I'm doing a search engine (connectingwith mysql), i'm saving in the database what peope search, may be this word "hack" searched 16 time. means in 16 rows.
the problem, how can i print top 10 search...?
// I connected to localhost and DB
//$result = mysql_query("select * from TableName");
//$affecteds = mysql_affected_rows(); /it can get 159/
//while($row = mysql_fetch_array($result)){
print $row['fieldName']; //it prints all rows
Iwant to print just the TOP 10
Thanks for your help
I'm doing a search engine (connectingwith mysql), i'm saving in the database what peope search, may be this word "hack" searched 16 time. means in 16 rows.
the problem, how can i print top 10 search...?
// I connected to localhost and DB
//$result = mysql_query("select * from TableName");
//$affecteds = mysql_affected_rows(); /it can get 159/
//while($row = mysql_fetch_array($result)){
print $row['fieldName']; //it prints all rows
Iwant to print just the TOP 10
Thanks for your help
