public function __construct($tabela = '', $pre = true) { if (!empty($tabela)) { $this->tabela = $tabela; } $this->pre = $pre; $this->parametros = BDConsultas::__VariaveisPadroes(); //$this->dados = new AbrirDados(($pre ? Sistema::$BDPrefixo : '').$this->tabela, $this->parametros); $this->con = BDConexao::__Abrir(); }
public function abrirOpcoes(&$parametros = '', $where = '', $inteiro = '', $cod = '') { if (!empty($parametros)) { $this->parametros = $parametros; } $query = BDConsultas::consultarCondicoes($this->tabela, $this->parametros['pos'], $where, $inteiro, $cod); $info = $query['con']->getRegistro(); $this->total = $query['max']->getTotal(); $this->parametros['pos']++; $parametros = $this->parametros; if ($query['con']->getTotal() > 0 && $this->parametros['pos'] <= $this->parametros['limite']) { return $info; } else { return false; } }