Connection类quote方法默认连接从库

This commit is contained in:
thinkphp
2017-10-26 11:17:44 +08:00
parent 7b5044b888
commit e414fc644a

View File

@@ -872,7 +872,7 @@ abstract class Connection
* @param bool $master 是否主库查询 * @param bool $master 是否主库查询
* @return string * @return string
*/ */
public function quote($str, $master = true) public function quote($str, $master = false)
{ {
$this->initConnect($master); $this->initConnect($master);
return $this->linkID ? $this->linkID->quote($str) : $str; return $this->linkID ? $this->linkID->quote($str) : $str;