public function set_table_search($tbl) { //assuring $data is safe to be executed on a db query EDatabase::safe($data); //setting internal attribute if (EDatabase::table_exists($tbl)) { $this->table = $tbl; $this->datatable = new EData($this->table); } else { ELog::error("{$tbl} does not exists on database."); } }
public function __construct($tbl = "") { if (!empty($tbl)) { $this->table = $tbl; if (EDatabase::table_exists($this->table)) { $this->get_table_info(); } else { ELog::error("{$tbl} does not exists on database."); } $this->dbg = false; $this->ready = true; } }