mysql搜索像不工作的长短语



我有一个MySQL表,类型为'MyISAM',排序:'latin1_swedish_ci'。在它里面,我有一个名为"content"的列。

在里面,我有一个包含以下内容的行:

<p>The state will have a different advantage over most other states, with one of the largest populations in the nation to blablablabla. </p>

我的查询是在phpMyAdmin和我的PHP文件中:

SELECT *
FROM `pages`
WHERE `content` LIKE '%with one of the largest populations%'
ORDER BY `pages`.`title` ASC
LIMIT 0 , 30

返回0行。

奇怪的是,如果我将查询编辑为:

SELECT *
FROM `pages`
WHERE `content` LIKE '%with one of the largest%'
ORDER BY `pages`.`title` ASC
LIMIT 0 , 30

然后,返回1行,它工作。

是否有任何设置可以将搜索查询限制为仅几个单词或仅几个字符?

很可能还有其他空白字符,否则,您的查询看起来很好。

尝试此largest populations也应该返回0 recs。

替换前一列的字符,查找

你可以在这里找到一些帮助

最新更新