Php 遇到类似sql的问题
我有以下疑问:Php 遇到类似sql的问题,php,mysql,sql,Php,Mysql,Sql,我有以下疑问: SELECT * FROM `alerts` WHERE `title` LIKE `%template%` 这应该会返回至少3个标题包含单词“template”的结果,但我发现以下错误:- 1054-where子句中的未知列“%template%” 据我所知,它在语法上是正确的,并且调用了正确的列名。我缺少什么?对%template%使用单引号: SELECT * FROM `alerts` WHERE `title` LIKE '%template%' 对%templ
SELECT * FROM `alerts` WHERE `title` LIKE `%template%`
这应该会返回至少3个标题包含单词“template”的结果,但我发现以下错误:-
1054-where子句中的未知列“%template%”
据我所知,它在语法上是正确的,并且调用了正确的列名。我缺少什么?对
%template%
使用单引号:
SELECT * FROM `alerts` WHERE `title` LIKE '%template%'
对
%template%
使用单引号:
SELECT * FROM `alerts` WHERE `title` LIKE '%template%'
传奇谢谢!你知道吗,当你看得太久的时候,你错过了这样的东西,谢谢你,伙计。谢谢你!你知道当你看着它太久的时候,你错过了这样的东西,谢谢,伙计。