refactoring for Load::model removal
git-svn-id: svn+ssh://code.netmonsters.ru/svn/majestic/trunk@56 4cb57b5f-5bbd-dd11-951b-001d605cbbc5
This commit is contained in:
@ -19,7 +19,7 @@ abstract class Model
|
||||
|
||||
function __construct()
|
||||
{
|
||||
$this->handler = DBConnector::getConnect(Env::getParam('db_settings'));
|
||||
$this->handler = DBConnector::getInstance()->getConnect(Env::getParam('db_settings'));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -30,7 +30,9 @@ abstract class Model
|
||||
*/
|
||||
function exec($sql)
|
||||
{
|
||||
$time = microtime(true);
|
||||
if (DEBUG_ENABLE) {
|
||||
$time = microtime(true);
|
||||
}
|
||||
$res = mysqli_query($this->handler, $sql);
|
||||
if (mysqli_errno($this->handler)) {
|
||||
throw new MJException("<b>Query Error:</b>\n".$sql."\n<b>Error:</b>\n".mysqli_error($this->handler), 1);
|
||||
|
Reference in New Issue
Block a user