thinkphp
thinkphp copied to clipboard
Model.class.php里面的query和execute为什么不支持一下bind绑定参数方法呢?
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效率还是很有必要的。