版本引发的血案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