最後のORが原因で、クエリが誤った結果を返していました オペレーターはすべてのレコードをdescriptionsで修飾しました $onewordを含む 。代わりに、()を使用する必要があります テキスト検索条件をグループ化します。
select *
from mytable
where time <= '".$time ."' and person = '".$person."'
and category in ('". implode("','", $_POST['categories']) ."')
and cities in ('". implode("','", $_POST['cities']) ."')
and weather in ('". implode("','", $_POST["weather"]) ."')
and (word like '%".$oneword."%' or description like '%".$oneword."%');