velaware Posted September 11, 2014 Report Share Posted September 11, 2014 To make this short, as a developer I've ran into situations where I've had to connect to a different database within Blesta before. Right now I'm having to manage the PDO stuff myself, which gets ugly and troublesome. Basically what I would like to see is the ability to use the Record class to connect to more than just the Blesta database. Quote Link to comment Share on other sites More sharing options...
Blesta Addons Posted September 12, 2014 Report Share Posted September 12, 2014 $db_info = array( 'driver' => "mysql", 'host' => "yourmysqlserver.com", 'database' => "database_name", 'user' => "database"user", 'pass' => "password_database", 'persistent' => false, // or true 'charset_query' => "SET NAMES 'utf8'", 'options' => array() ); $remote_database = new Record($db_info); PauloV 1 Quote Link to comment Share on other sites More sharing options...
velaware Posted September 12, 2014 Author Report Share Posted September 12, 2014 $db_info = array( 'driver' => "mysql", 'host' => "yourmysqlserver.com", 'database' => "database_name", 'user' => "database"user", 'pass' => "password_database", 'persistent' => false, // or true 'charset_query' => "SET NAMES 'utf8'", 'options' => array() ); $remote_database = new Record($db_info); Has this worked for you? Didn't know this is how the PDO objects were created in Blesta. Quote Link to comment Share on other sites More sharing options...
Blesta Addons Posted September 12, 2014 Report Share Posted September 12, 2014 Has this worked for you? Didn't know this is how the PDO objects were created in Blesta. i have not tested , but i have inspired from the migrator plugin . it should work . Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.