Пример #1
0
 /**
  * Construtor chama a construtor da classe \Conection
  */
 public function __construct()
 {
     try {
         if ($this->adapter === null) {
             $this->adapter = parent::__construct();
         }
     } catch (Exception $ex) {
         $this->adapter = null;
         echo $ex;
     }
 }
Пример #2
0
 public function __construct($limit, $page, $url, $from, $where = null)
 {
     parent::__construct(DB_HOST, DB_USER, DB_PASS, DB_NAME);
     $this->mysqli = parent::setConectar();
     $this->_limit = $limit;
     $this->_page = $page;
     if ($page < 1) {
         $page = 1;
     }
     $this->_offset = ($page - 1) * $limit;
     $this->_url = $url;
     $this->_from = $from;
     $this->_where = $where;
     $this->getNrows();
 }
Пример #3
0
 public function __construct()
 {
     parent::__construct(DB_HOST, DB_USER, DB_PASS, DB_NAME);
     $this->mysqli = parent::setConectar();
 }