The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multiple Database Connections
#2
Yes.  So if both dbs use the same credentials (as in same username, same host, same password), you can just do 
$db1 = DB::getDB(['db1name']);
$db2 = DB::getDB(['db2name']);

Then use them as you would the regular db.  If you have a different configuration, let me know and we can figure it out.  

Note that this feature is part of 4.4 and I'm not 100% sure if I pushed it out on the latest 4.3 release, so if that doesn't work, just replace users/classes/DB.php with https://pastebin.com/enb0zaGt
  Reply


Messages In This Thread
Multiple Database Connections - by usamusa - 09-03-2018, 02:46 PM
RE: Multiple Database Connections - by mudmin - 09-03-2018, 03:12 PM
RE: Multiple Database Connections - by usamusa - 09-03-2018, 03:45 PM
RE: Multiple Database Connections - by mudmin - 09-03-2018, 03:56 PM
RE: Multiple Database Connections - by usamusa - 09-04-2018, 06:12 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)