问题
WordPress数据库错误:[您的SQL语法出错;检查与MySQL服务器版本对应的手册,以便在第3行附近使用正确的语法] SELECT * FROM wp_mash_fields WHERE docid IN()
的代码是
$sql = "SELECT *
FROM $this->flds
WHERE docid IN(".implode(',' , array_keys($r)).")";
$r2 = $this->db->get_results($sql, ARRAY_A);
WordPress数据库错误:[您的SQL语法出错;检查与MySQL服务器版本对应的手册,以便在第3行的'LIMIT 0,999'附近使用正确的语法.SELECT SQL_CALC_FOUND_ROWS DISTINCT wp_mash_documents。* FROM wp_mash_documents WHERE wp_mash_documents.type ='image'ORDER BY wp_mash_documents。限制0,999;
的代码是
function get($type, $page = 0, $limit = 10, $sort = 'modify_time', $ord = 'ASC', $rel = null, $dorder = false, $s = null)
{
$ll = $page * $limit;
$docs = $this->docs;
$flds = $this->flds;
$rels = $this->rels;
$inner = array();
$where = array();
$order = '';
// get ids
$sql = "SELECT SQL_CALC_FOUND_ROWS DISTINCT $docs.*".($dorder? ",$rels.dorder" : "")." FROM $docs";
switch ($sort) {
case "title":
$inner[$flds] = array("$docs.id", "$flds.docid");
$where["$flds.name"] = "='title'";
$order = "$flds.value_text $ord";
if (isset($s)) {
$where["MATCH ($flds.value_text)"] = " AGAINST ('$s')";
}
答案 0 :(得分:0)
给出您的错误消息:
ORDER BY wp_mash_documents. LIMIT 0,999;
^---missing field name