I've built a series of different query options for my database and based on what options the user selects, the search engine will perform accordingly.
My final tweak to this system though is to figure out how I can count the number of times a search query comes up in the body field. I want to order the results by the number of times the search is found in this field. So far, this is what I have:
if (isset($_POST['content'])) {
$query = "SELECT id, title, author, rating, rating_total, body, date FROM data_array WHERE body LIKE '%$searchtopic%' ORDER BY rating/rating_total DESC";
}
Thanks in advance.