Hi, I found just on api documentation (nowhere else) the use of hasDatabase method, usefull for multiple connection setting. Maybe it could be documented at redbeanphp.com site as a way of checking if a database is already set to a key. My example:
if (!R::hasDatabase('db2')) {
R::addDatabase('db2', 'sqlite:/path/db2.db');
}
R::selectDatabase('db2');
Hi, I found just on api documentation (nowhere else) the use of hasDatabase method, usefull for multiple connection setting. Maybe it could be documented at redbeanphp.com site as a way of checking if a database is already set to a key. My example: