thinkphp icon indicating copy to clipboard operation
thinkphp copied to clipboard

Model.class.php里面的query和execute为什么不支持一下bind绑定参数方法呢?

Open bugZhang opened this issue 9 years ago • 0 comments

query方法调用query方法并没有传入绑定参数。

public function query($sql, $parse = false)
    {
        if (!is_bool($parse) && !is_array($parse)) {
            $parse = func_get_args();
            array_shift($parse);
        }
        $sql = $this->parseSql($sql, $parse);
        return $this->db->query($sql);
    }

绑定参数对于提高sql效率还是很有必要的。

bugZhang avatar Oct 09 '16 08:10 bugZhang