Похоже, у вас есть два WHERE
предложения:
SELECT *
WHERE story_time > time()-86400
AND MATCH (story_title) AGAINST ('".validate_input($_GET['q'])."' IN BOOLEAN MODE)
AS Relevance
FROM ".$config['db']['pre']."stories
WHERE MATCH (story_title) AGAINST ('+".validate_input($_GET['q'])."' IN BOOLEAN MODE)
HAVING Relevance > 0.2
ORDER BY Relevance DESC, story_time DESC LIMIT
Должно быть что-то вроде этого:
SELECT *, MATCH (story_title) AGAINST ('".validate_input($_GET['q'])."' IN BOOLEAN MODE)
AS Relevance
FROM ".$config['db']['pre']."stories
WHERE MATCH (story_title) AGAINST ('+".validate_input($_GET['q'])."' IN BOOLEAN MODE)
HAVING Relevance > 0.2
AND story_type > time() - 86400
ORDER BY Relevance DESC, story_time DESC LIMIT