Why does this query only show one result?

后端 未结 3 1444
闹比i
闹比i 2021-01-24 08:19

The query below will be used a search script. For some reason it won\'t return all results where either condition is true. What am i doing wrong?

$sql = \"SELE         


        
3条回答
  •  误落风尘
    2021-01-24 08:40

    You really shouldn't be using MySQL for fulltext search (see: http://en.wikipedia.org/wiki/Full_text_search). Instead, consider using MySQL's fulltext capabilities: http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html. Or possibly even better, use a "real" fulltext search engine like Lucene (see: http://lucene.apache.org/) or Sphinx (see: http://sphinxsearch.com/).

提交回复
热议问题