Connect to other database (5.7)

Permalink 2 users found helpful

I have created a custom form. The result of the form needs to be written to another database. How is this achieved?

In Concrete 5.6 it was possible like this:
$db = Loader::db( 'newserver', 'newuser', 'newpassword', 'newdatabase', true);

Currently I am still writing to the site database
$db = Database::get();
//tried this
$db = Loader::db('localhost', 'root', 'root', 'db_new', true);
//db_original.db_new does not exist

Thanks for the help

View Replies: View Best Answer
rge replied on at Permalink Best Answer Reply
Joe Meyer answered my question on StackOverflow:
MrKDilkington replied on at Permalink Reply

Thank you for posting the solution on the forum.

This is useful information.