WordPress数据库错误您的SQL语法中有错误

时间:2021-03-30 15:43:51

I am facing this error.
WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 for query

我正面临这个错误。 WordPress数据库错误您的SQL语法中有错误;检查与您的MySQL服务器版本对应的手册,以获得正确的语法,以便在第1行的''附近进行查询

SELECT * 
FROM wp_author_favorite 
WHERE post_id = 1743 
AND author_id = made by require('D:\INETPUB\VHOSTS\engeniuspark.in\sos.engeniuspark.in\wp-blog-header.php'), 
require_once('D:\INETPUB\VHOSTS\engeniuspark.in\sos.engeniuspark.in\wp-includes\template-loader.php'), 
include('D:\INETPUB\VHOSTS\engeniuspark.in\sos.engeniuspark.in\wp-content\themes\theme-name\single.php'), 
wp_authors_favorite_check

1 个解决方案

#1


You need to give AND author_id = a value

您需要给AND author_id =一个值

SELECT * 
FROM wp_author_favorite 
WHERE post_id = 1743 
AND author_id = 1234 /*For example*/
made by require('D:\INETPUB\VHOSTS\engeniuspark.in\sos.engeniuspark.in\wp-blog-header.php'), 
require_once('D:\INETPUB\VHOSTS\engeniuspark.in\sos.engeniuspark.in\wp-includes\template-loader.php'), 
include('D:\INETPUB\VHOSTS\engeniuspark.in\sos.engeniuspark.in\wp-content\themes\theme-name\single.php'), 
wp_authors_favorite_check

#1


You need to give AND author_id = a value

您需要给AND author_id =一个值

SELECT * 
FROM wp_author_favorite 
WHERE post_id = 1743 
AND author_id = 1234 /*For example*/
made by require('D:\INETPUB\VHOSTS\engeniuspark.in\sos.engeniuspark.in\wp-blog-header.php'), 
require_once('D:\INETPUB\VHOSTS\engeniuspark.in\sos.engeniuspark.in\wp-includes\template-loader.php'), 
include('D:\INETPUB\VHOSTS\engeniuspark.in\sos.engeniuspark.in\wp-content\themes\theme-name\single.php'), 
wp_authors_favorite_check