Это мой контроллер
Код: Выделить всё
function menu()
{
$data['query'] = $this->get_where_custom('key', 'value');
$data['view_file'] = 'menu';
$this->load->view($data);
}
function get_where_custom($col, $value)
{
$this->load->model('mdl_menu');
$query = $this->mdl_menu->get_where_custom($col, $value);
return $query;
}
Код: Выделить всё
function get_where_custom($col, $value) {
$table = $this->get_table();
$this->db->where($col, $value);
$query=$this->db->get($table);
return $query;
}
Заранее спасибо.
Подробнее здесь: https://stackoverflow.com/questions/428 ... d-order-by