可以直接$db = Typecho_Db::get(); $sql = $db->select()->from('table.contents') ->where('cid = ?', $cid(文章cid)) ->where('type = ?', 'post') ->limit(1); $res = $db->fetchAll($sql); echo res[0]['text'];
可以直接