@@ -1812,9 +1812,11 @@ |
||
1812 | 1812 | |
1813 | 1813 | if ($this->config['rw_separate']) { |
1814 | 1814 | // 主从式采用读写分离 |
1815 | - if ($master) // 主服务器写入 |
|
1815 | + if ($master) { |
|
1816 | + // 主服务器写入 |
|
1816 | 1817 | { |
1817 | 1818 | $r = $m; |
1819 | + } |
|
1818 | 1820 | } elseif (is_numeric($this->config['slave_no'])) { |
1819 | 1821 | // 指定服务器读 |
1820 | 1822 | $r = $this->config['slave_no']; |
@@ -130,8 +130,7 @@ |
||
130 | 130 | list($field, $name) = explode('->>', $key, 2); |
131 | 131 | |
132 | 132 | return $this->parseKey($query, $field, true) . '->>\'$' . (strpos($name, '[') === 0 ? '' : '.') . str_replace('->>', '.', $name) . '\''; |
133 | - } |
|
134 | - elseif (strpos($key, '->') && false === strpos($key, '(')) { |
|
133 | + } elseif (strpos($key, '->') && false === strpos($key, '(')) { |
|
135 | 134 | // JSON字段支持 |
136 | 135 | list($field, $name) = explode('->', $key, 2); |
137 | 136 |
@@ -1221,7 +1221,7 @@ |
||
1221 | 1221 | if($errorNo==4){ |
1222 | 1222 | continue; |
1223 | 1223 | } |
1224 | - }else { |
|
1224 | + } else { |
|
1225 | 1225 | //有.符号,但是二级名称不匹配时 |
1226 | 1226 | if ($subName != $subFileName) { |
1227 | 1227 | continue; |