RedBeanPHP

easy ORM for PHP

Multiple databases

There are two important methods to keep in mind when working with multiple databases. To add a new database connection use R::addDatabase()


    R
::addDatabase('DB1','sqlite:/tmp/d1.sqlite','user','password',$frozen);

To select a database, use the key you have previously specified:


    R
::selectDatabase('DB1');


User contributed notes. Please use the comment section to provide tips, notes and examples. To ask for support or to provide feedback use the forum. For bug reports use Github Issue Tracker.

Site comments powered by Disqus

page generated in 0.010715961456299 sec.