版本引發的血案check the manual that corresponds to your MySQL server version for the right syntax


該錯誤mysql5.1有問題,mysql5.3版本沒問題

錯誤寫法:

private $t_poster;
    private $t_scene_id;
    
    private $tb_poster;
    private $tb_scene_id;
    
    public function __construct() {
        $this->t_poster = 'jiexiz_poster';
        $this->t_scene_id = 'jiexiz_scene_id';
        
        $this->tb_poster = tablename($this->t_poster);
        $this->tb_scene_id = tablename($this->t_scene_id);
    }

 
    public function get_poster_by_uniacid() {
        global $_W;
    
        $sql = "select * from " . $this->tb_poster . " where uniacid=:uniacid";
    
        $pars = array();
        $pars['uniacid'] = $_W['uniacid'];
    
        $exist = pdo_fetch($sql, $pars); //錯誤的寫法 

        if (!empty($exist)) {
            $exist = $this->decode_poster_param($exist, $exist['bgparam']);
        }
    
        return $exist;
    }

    public function get_poster_by_uniacid() {
        global $_W;
    
        $sql = "select * from " . $this->tb_poster . " where uniacid=:uniacid";
    
        $exist = pdo_fetch($sql, array(":uniacid"=>$_W['uniacid']));///正確的寫法

        if (!empty($exist)) {
            $exist = $this->decode_poster_param($exist, $exist['bgparam']);
        }
    
        return $exist;
    }

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



猜您在找 MySQL check the manual that corresponds to your MySQL server version for the right syntax錯誤 Mysql錯誤:check the manual that corresponds to your MySQL server version for the right syntax ; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IDENTIFIED BY '123456' WITH GRANT OPTION' at line 1 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 '"id", ERROR 1064 (42000): 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 Mysql語法錯誤之> 1064 - 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' MySql 執行語句錯誤 Err] 1064 - 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 Django進行數據遷移時,報錯:(1064, "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 '(6) NOT NULL)' at line 1") 解決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 'order (order_name, customer) mybatis批量更新update-設置多個字段值 報錯 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
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM