zoukankan      html  css  js  c++  java
  • 版本引发的血案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;
        }
  • 相关阅读:
    JS基础语法
    JS的初步了解
    CSS初步学习
    HTML标签
    初步了解HTML
    LEGB规则
    Python面试题练习
    闭包
    Caché,Cache数据库连接并查询数据
    Caché,Cache数据库下载
  • 原文地址:https://www.cnblogs.com/lvchenfeng/p/5311352.html
Copyright © 2011-2022 走看看