前台插件访问
This commit is contained in:
@@ -61,17 +61,27 @@ class Sqlsrv extends Builder
|
||||
}
|
||||
|
||||
/**
|
||||
* 字段名分析
|
||||
* 字段和表名处理
|
||||
* @access protected
|
||||
* @param string $key
|
||||
* @param array $options
|
||||
* @return string
|
||||
*/
|
||||
protected function parseKey($key)
|
||||
protected function parseKey($key, $options = [])
|
||||
{
|
||||
$key = trim($key);
|
||||
if (strpos($key, '.') && !preg_match('/[,\'\"\(\)\[\s]/', $key)) {
|
||||
list($table, $key) = explode('.', $key, 2);
|
||||
if (isset($options['alias'][$table])) {
|
||||
$table = $options['alias'][$table];
|
||||
}
|
||||
}
|
||||
if (!is_numeric($key) && !preg_match('/[,\'\"\*\(\)\[.\s]/', $key)) {
|
||||
$key = '[' . $key . ']';
|
||||
}
|
||||
if (isset($table)) {
|
||||
$key = '[' . $table . '].' . $key;
|
||||
}
|
||||
return $key;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user