改进一处mysql兼容性问题

This commit is contained in:
thinkphp
2018-04-13 11:33:30 +08:00
parent 427bf4b2df
commit e4d4911b46
2 changed files with 3 additions and 2 deletions

View File

@@ -105,7 +105,8 @@ class Mysql extends Builder
$table = $options['alias'][$table];
}
}
if ($strict || !preg_match('/[,\'\"\*\(\)`.\s]/', $key)) {
if ('*' != $key && ($strict || !preg_match('/[,\'\"\*\(\)`.\s]/', $key))) {
$key = '`' . $key . '`';
}
if (isset($table)) {