Код: Выделить всё
function select($table, $match, $or)
{
$this->db->select('*');
$this->db->from($table);
$this->db
->where($match)
->or_where($or);
$query = $this->db->get();
$query_result = $query->result();
return $query_result;
}
Код: Выделить всё
$post = array(
"class" => "XI",
"section" => "A",
"stream" => "Medical"
);
$data = $this->main_model->select(
"class_subjects",
array(
"class" => $post['class'],
"section" => "all",
"stream" => $post['stream']
),
$post
);
print_r($data);
Мобильная версия