Jump to content

Recommended Posts

Posted

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.

Posted

$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);


 

Posted

$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.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...