php - Table prefix in pyrocms -


i working on custom multiple delete in pyrocms module,how use delete in model code:

 protected $_table = 'accounts';     public function muldelete($muldelete)          {                $sql = 'delete ' . $this->_table . ' id in('.$muldelete. ')';             $query = $this->db->query($sql);          } 

but $this->_table returning accounts instead of username_accounts,how check username table prefix in clause in pyrocms

$sql = 'delete ' .'username_'. $this->_table . ' id in('.$muldelete. ')'; 

or

protected $_table = 'username_accounts'; 

or dyamically

    $ci =& get_instance();     $ci->load->database();     echo $ci->db->dbprefix; 

Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -