MySQL - How do I insert an additional where clause into this full-text search (updated)
        Posted  
        
            by Steven
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Steven
        
        
        
        Published on 2010-06-07T19:46:59Z
        Indexed on 
            2010/06/07
            20:52 UTC
        
        
        Read the original article
        Hit count: 235
        
mysql
|full-text-search
I want to add a WHERE clause to a full text search query (to limit to past 24 hours), but wherever I insert it I get Low Level Error. Is it possible to add the clause and if so, how? Here is the code WITHOUT the where clause:
        $query = "SELECT *, MATCH (story_title) AGAINST ('$query' IN BOOLEAN MODE) 
AS Relevance FROM stories WHERE MATCH (story_title) AGAINST ('+$query' IN BOOLEAN MODE)
 HAVING Relevance > 0.2 ORDER BY Relevance DESC, story_time DESC;
        © Stack Overflow or respective owner