mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 15:12:48 +08:00
Connection类quote方法增加master参数
This commit is contained in:
@@ -733,11 +733,12 @@ abstract class Connection
|
|||||||
* SQL指令安全过滤
|
* SQL指令安全过滤
|
||||||
* @access public
|
* @access public
|
||||||
* @param string $str SQL字符串
|
* @param string $str SQL字符串
|
||||||
|
* @param bool $master 是否主库查询
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function quote($str)
|
public function quote($str, $master = false)
|
||||||
{
|
{
|
||||||
$this->initConnect();
|
$this->initConnect($master);
|
||||||
return $this->linkID ? $this->linkID->quote($str) : $str;
|
return $this->linkID ? $this->linkID->quote($str) : $str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user