我有sql查询:
$query= "SELECT * FROM files ORDER BY id DESC LIMIT $from, $site WHERE custom > 0";
但不工作,我注意到:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax
我做错了什么?我有sql查询:
$query= "SELECT * FROM files ORDER BY id DESC LIMIT $from, $site WHERE custom > 0";
但不工作,我注意到:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax
我做错了什么?你有where
查询的子句位于错误的位置。
您的查询应该这样写:
$query= "SELECT *
FROM files
WHERE custom > 0
ORDER BY id DESC
LIMIT $from, $site";
我正在使用简单的代码来创建搜索页面$argscontactdirectory = array( \"s\" => get_search_query(), \'post_type\' => array( \'expertarticle\'), \'orderby\' => \'title\', \'order\' => \'ASC\',