Exemplo n.º 1
0
 function __construct($connect_db = '', $connect_host = 'localhost', $connect_username = '******', $connect_password = '', $connect_port = 3306, $connect_charset = 'utf8')
 {
     if (empty($connect_db)) {
         return false;
     }
     parent::__construct();
     $this->_charset = $connect_charset;
     $this->_con = @new \mysqli($connect_host, $connect_username, $connect_password, $connect_db, $connect_port);
     if ($this->_con->connect_error) {
         throw new TQExceptionHandle("Connect Error {$this->_con->connect_errno}: {$this->_con->connect_error}", 500);
     } else {
         $this->_con->query("SET NAMES {$connect_charset}");
     }
 }
Exemplo n.º 2
0
 public function __construct()
 {
     parent::__construct();
     $this->setCon(TQBase::getApp()->db);
     $this->init();
 }
Exemplo n.º 3
0
 public function __destruct()
 {
     parent::__destruct();
 }
Exemplo n.º 4
0
 public function __construct($id)
 {
     parent::__construct();
     $this->formId = $id;
 }