04-30-2019, 10:10 PM
first of all thanks for this great tool, i've been planning to add user functions to my site but it was too much of a hassle, userspice just made it doable in less than a day.
one thing i'm having a problem with rn is connecting to 2 different databases, i've checked the forum and found an old thread for ver4.3 about the same thing, tried that
both databases are on the same server and use same user, so that's probably not the problem.
one thing may be important to point out is that the code completely stops executing after the error, the rest of the page doesn't load.
the page i'm using the code on is the users\account.php page, i'm trying to use an external database (different from the one used by userspice) to get and display data.
one thing i'm having a problem with rn is connecting to 2 different databases, i've checked the forum and found an old thread for ver4.3 about the same thing, tried that
Quote:$db1 = DB::getDB(['db1name']);and this error came up
$db2 = DB::getDB(['db2name']);
Quote:SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not knowni've read around and i think there's something i'm doing wrong when using the code above.
both databases are on the same server and use same user, so that's probably not the problem.
one thing may be important to point out is that the code completely stops executing after the error, the rest of the page doesn't load.
the page i'm using the code on is the users\account.php page, i'm trying to use an external database (different from the one used by userspice) to get and display data.