Connection类quote方法增加master参数

This commit is contained in:
thinkphp
2016-09-11 12:47:51 +08:00
parent 739f8bef18
commit 2e930bd2a5

View File

@@ -733,11 +733,12 @@ abstract class Connection
* SQL指令安全过滤
* @access public
* @param string $str SQL字符串
* @param bool $master 是否主库查询
* @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;
}