且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Mysql 和 PHP LIKE 查询在页面上没有生成结果,但在 Mysql 中返回结果

更新时间:2023-09-29 19:04:16

问题是这一行:

$sql_query_holder="\"".$sql_query_holder."\"";

您的脚本不会输出整个查询,只会输出其中的一部分,然后会对其进行修改.难怪你看不到哪里出了问题.

Your script doesn't output the whole query, just part of it, which it then modifies. No wonder you couldn't see what was wrong.

它运行的查询实际上是:

The query it's running is actually:

SELECT * FROM fm_sources WHERE "excerpt LIKE '%Roy Hodgson%' OR title LIKE '%Roy Hodgson%' <etc etc> " ORDER BY tweet_count DESC

你不需要那些额外的引号

You don't need those extra inverted commas