it is low efficient to use "like '%$var%'",no recommend to use it.SELECT * FROM question where keyword LIKE '%".$_GET[keyword]."%' order by keyword desc,id desc";
关键字包含$_GET[keyword]或者正文包含$_GET[keyword]或者标题包含$_GET[keyword]的条目 -----------------------------then tell us what's the value of called "keywords".
没明白楼上是什么意思!------------------------ if you want to search the keywords from the content,then why do you build the keyword column in database ???
SELECT *,1 as SERIAL FROM question where keyword LIKE '%".$_GET[keyword]."%' UNION SELECT *,2 as SERIAL FROM question where title like '%".$_GET[keyword]."%' UNION SELECT *,3 as SERIAL FROM question where content_sim like binary '%".$_GET[keyword]."%' OR content like binary '%".$_GET[keyword]."%'ORDER BY SERIAL
-----------------------------then tell us what's the value of called "keywords".
if you want to search the keywords from the content,then why do you build the keyword column in database ???
UNION
SELECT *,2 as SERIAL FROM question where title like '%".$_GET[keyword]."%'
UNION
SELECT *,3 as SERIAL FROM question where content_sim like binary '%".$_GET[keyword]."%' OR content like binary '%".$_GET[keyword]."%'ORDER BY SERIAL