I've got a single query pulling all the rows in a table, but I want to set it up so the top 10 or top 20 occurances of the same item come back. Here's my query code:
mysql_select_db($database_DB_Con, $DB_Con);
$query_websearches = "SELECT * FROM searches";
$websearches = mysql_query($query_websearches, $DB_Con) or die(mysql_error());
$row_websearches = mysql_fetch_assoc($websearches);
$totalRows_websearches = mysql_num_rows($websearches);
As you can see, I'm keeping a log of the searches ... but I want to make sure that when someone searches for 'focus', it'll also be coupled with 'FOCUS' or 'Focus' on this search data.
Just so you know, this isn't a search engine, this is a report of the search engine. And I want to be able to show the people in the company what the top 5 or 10 or 20 items are that people are searching for.