Jump to content

Open Up Record Component More


velaware

Recommended Posts

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.

Link to comment
Share on other sites


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


 

Link to comment
Share on other sites


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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...