I was wondering if this is allowed with expression engine.
<?
// PHP back end file
define('EXT','foo');
require("../path.php");
require(".".$system_path."config.php");
require(".".$system_path."db/db.mysql.php");
$db_config = array(
'hostname' => $conf['db_hostname'],
'username' => $conf['db_username'],
'password' => $conf['db_password'],
'database' => $conf['db_name'],
'prefix' => $conf['db_prefix'],
'conntype' => $conf['db_conntype'],
'debug' => 0,
'show_queries' => FALSE,
'enable_cache' => FALSE
);
$DB = new DB($db_config);
$feilds_q = $DB->query("SELECT * FROM ...");
...
...
?>
Not wanting to use raw mysql_query() and all it’s friends i got the $DB class to work outside of expression engine system for a back end script that runs on my expression engine site. I’ve made no edits to anything in /system/ i just reference it with the above code. The other part of the module is with in expression engine and just uses $DB->whatever(). So is this allowed to be done this way?
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.