FaaPz / PDO

Just another PDO database library
MIT License
316 stars 103 forks source link

Master slave database? #51

Closed zuozhehao closed 5 years ago

zuozhehao commented 8 years ago

When I use ‘select’, I need to use the slave database and how to configure the master slave database.?

kwhat commented 5 years ago

I think this is outside of the scope for this library. To support read/write splits, please create two different connections by constructing two Database classes with different DSN's. Use something like your dependency injector to juggle between them.