mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-02 05:02:48 +08:00
sqlsrv驱动增加parseKey方法
This commit is contained in:
@@ -96,6 +96,20 @@ class Sqlsrv extends Driver{
|
||||
return !empty($order)? ' ORDER BY '.$order:' ORDER BY rand()';
|
||||
}
|
||||
|
||||
/**
|
||||
* 字段名分析
|
||||
* @access protected
|
||||
* @param string $key
|
||||
* @return string
|
||||
*/
|
||||
protected function parseKey(&$key) {
|
||||
$key = trim($key);
|
||||
if(!preg_match('/[,\'\"\*\(\)\[.\s]/',$key)) {
|
||||
$key = '['.$key.']';
|
||||
}
|
||||
return $key;
|
||||
}
|
||||
|
||||
/**
|
||||
* limit
|
||||
* @access public
|
||||
|
||||
Reference in New Issue
Block a user