改进对存储过程调用的支持 改进getRealSql的调用机制 改进数据表字段使用中划线的参数绑定支持

This commit is contained in:
thinkphp
2017-01-10 10:31:22 +08:00
parent 8f5fbe2e9f
commit 49108300c9
2 changed files with 92 additions and 45 deletions

View File

@@ -316,7 +316,7 @@ abstract class Builder
throw new Exception('where express error:' . $exp);
}
}
$bindName = $bindName ?: 'where_' . str_replace('.', '_', $field);
$bindName = $bindName ?: 'where_' . str_replace(['.', '-'], '_', $field);
if (preg_match('/\W/', $bindName)) {
// 处理带非单词字符的字段名
$bindName = md5($bindName);