function __construct($db = null) { if (class_exists('jqGridDB')) { $interface = jqGridDB::getInterface(); } else { $interface = 'local'; } $this->pdo = $db; if ($interface == 'pdo') { $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $this->dbtype = $this->pdo->getAttribute(PDO::ATTR_DRIVER_NAME); if ($this->dbtype == 'pgsql') { $this->I = 'I'; } } else { $this->dbtype = $interface; } }
function __construct($db = null) { if (class_exists('jqGridDB') && $db) { $interface = jqGridDB::getInterface(); } else { $interface = 'chartarray'; } $this->conn = $db; if ($interface == 'pdo') { try { $this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $this->dbtype = $this->conn->getAttribute(PDO::ATTR_DRIVER_NAME); } catch (Exception $e) { } } else { $this->dbtype = $interface; } # Set Default Values $this->coptions['credits']['enabled'] = false; $this->coptions['chart']['renderTo'] = ''; $this->coptions['series'] = array(); $this->i_serie_index = 0; $this->jscode = false; }
/** * * Constructor * @param resource - $db the database connection passed to the constructor */ function __construct($db = null, $odbctype = '') { if (class_exists('jqGridDB')) { $interface = jqGridDB::getInterface(); } else { $interface = 'local'; } $this->pdo = $db; if ($interface == 'pdo' && is_object($this->pdo)) { $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $this->dbtype = $this->pdo->getAttribute(PDO::ATTR_DRIVER_NAME); if ($this->dbtype == 'pgsql') { $this->I = 'I'; } } else { $this->dbtype = $interface . $odbctype; } $oper = $this->GridParams["oper"]; $this->oper = jqGridUtils::GetParam($oper, false); }
/** * * Constructor * @param resource $db the database connection passed to the constructor. * In case of array set to 'local' */ function __construct($db = null) { if (class_exists('jqGridDB')) { $interface = jqGridDB::getInterface(); } else { $interface = 'local'; } $this->conn = $db; if ($interface == 'pdo') { $this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $this->dbtype = $this->conn->getAttribute(PDO::ATTR_DRIVER_NAME); } else { $this->dbtype = $interface; } $this->term = jqGridUtils::GetParam('term', -1); if ($this->term !== -1) { $this->runAll = false; } $this->element = jqGridUtils::GetParam('acelem', ''); }