Can this be done in a query or I have to use PHP to do this?
My first solution though is to concatenate all strings to a single one, then perform the search from there.
Code: Select all
$strings = array();
$query = "SELECT * FROM requests";
$result = mysql_query($query);
while($data=mysql_fetch_array($result)){
$strings[] = $data['descp'];
}
$all_strings = implode(". ",$strings);
// do the search operation here
$word = getMostCommonWord($all_strings);Can you help me with this?
Thanks in advance.