读写分离

Thinkphp3.2.3设置MySql主从读写分离后,如何方便的调用主库查询

1、thinkphp/Library/Think/Model.class.php
62行:


protected $methods          =   array('strict','order','alias','having',
'group','lock','distinct','auto','filter','validate','result',
'token','index',’force’,’master’);  //1、添加,’master’

2、ThinkPHP/Library/Think/Db/Driver.class.php

» 阅读全文

关键词: 读写分离 , thinkphp , mysql主从