how can I make it so that when searching, the search MUST CONTAIN ALL WORDS. as if now, if for example a user search for cadillac escalade, the search results will include every row that has cadillac and every row that has eldorado, even if they not both in the same row.
the php code:
<?php
/* connect to MySQL */
$query = "
SELECT *,
MATCH(title, body) AGAINST ('cadillac eldorado') AS score
FROM articles
WHERE MATCH(title, body) AGAINST('cadillac eldorado')
";
$sql = MySQL_query($query);
/* display the results... */
?>
so im trying to make it so when search the title & body, the two fields combine must include both words in order to be counted.
You can use Boolean mode: http://dev.mysql.com/doc/refman/5.0/en/fulltext-boolean.html
With this turned on, you can just put a + in front of every term, like on Google.