改进sqlsrv驱动类parseKey方法

This commit is contained in:
thinkphp
2016-10-07 11:47:44 +08:00
parent 14f4302156
commit de7d3e39e0

View File

@@ -70,7 +70,7 @@ class Sqlsrv extends Builder
protected function parseKey($key, $options = [])
{
$key = trim($key);
if (strpos($key, '.')) {
if (strpos($key, '.') && !preg_match('/[,\'\"\(\)\[\s]/', $key)) {
list($table, $key) = explode('.', $key, 2);
if (isset($options['alias'][$table])) {
$table = $options['alias'][$table];