Trying to figure out how to run a separate query out from inside the OpenCart system to an external server, separate from the one that OC has its product db on. It sets these variables:
Code PHP:
// DB
define('DB_DRIVER', 'mysql');
define('DB_HOSTNAME', 'localhost');
define('DB_USERNAME', 'xxxx');
define('DB_PASSWORD', 'xxxx');
define('DB_DATABASE', 'xxxx');
define('DB_PREFIX', '');
and then runs it through these classes:
Code PHP:
final class MySQL {
	private $connection;
	public function __construct($hostname, $username, $password, $database) {
		if (!$this->connection = mysql_connect($hostname, $username, $password)) {
      		exit('Error: Could not make a database connection using ' . $username . '@' . $hostname);
    	} .... etc... AND 
final class DB {
	private $driver;
	public function __construct($driver, $hostname, $username, $password, $database) {
		if (file_exists(DIR_DATABASE . $driver . '.php')) {
			require_once(DIR_DATABASE . $driver . '.php');
		} else {
			exit('Error: Could not load database file ' . $driver . '!');
		$this->driver = new $driver($hostname, $username, $password, $database);
	} ...etc...
Im not sure how to go about creating a new set of variables for it to connect to or even if this is possible...