2016-04-24 51 views
1

我想只輸出mysqli行afmeldtijd = 00:00:00 不知何故我卡住了。 我找不到我做錯了什麼。顯示哪裏行功能codeigniter

控制器頁面

public function ajax_list() 
     { 
     $list = $this->person->get_datatables(); 
     $data = array(); 
     $no = $_POST['start']; 
     foreach ($list as $person) { 
     $no++; 
     $row = array(); 
     $row[] = $person->datum; 
     $row[] = $person->firma; 
     $row[] = $person->naam; 
     $row[] = $person->telefoonnummer; 
     $row[] = $person->werkzaamheden; 
     $row[] = $person->opdrachtgever; 
     $row[] = $person->pasnummer; 
     $row[] = $person->aangemeld; 
     $row[] = $person->aanmeldtijd; 
    } 

模型頁面

public function get_datatabels() 
{ 
$this->_get_datatables_query(); 
$where = "afmeldtijd='00:00:00'"; 
$this->db->where($where); 
    } 

回答

0

試試這個

public function get_datatabels() 
{ 
$this->db->where('afmeldtijd','00:00:00'); 
$data = $this->db->get('tableName'); 
return $data->result(); 
} 

變化tableName您的表名