如何检索在一列上具有空值和一个特定值的行数据



我想从表course中检索program_vss为null和2值的行数据。

return $this->db->get_where('course', array('is_top_course' => 1, 'status' => 'active', 'program_vss'=> null ,  ));

关于如何检索具有两个条件的数据的任何建议

您可以使用数组并传递数组:-

关联数组方法:-

$array = array('name' => $name, 'title' => $title, 'status' => $status);
$this->db->where($array); 
// Produces: WHERE name = 'Joe' AND title = 'boss' AND status = 'active'

相关内容

最新更新