显示具有功能codeigniter的行

时间:2016-04-24 18:08:01

标签: php jquery mysql codeigniter codeigniter-3

我想只输出afmeldtijd = 00:00:00的mysqli行 不知怎的,我卡住了。 我找不到我做错了什么。

控制器页面

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);
    }

1 个答案:

答案 0 :(得分:0)

试试这个

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

使用您的表名更改tableName