5
누군가 나를 도와 줄 수 있는지 궁금합니다.Codeigniter - 알파벳순 알파벳순으로 주문하기
모델에 함수를 호출하는 아약스가 약간 있습니다.
하지만 '모델'로 출력을 주문할 수없는 것 같습니다.
function get_models_by_brand($tree = null)
{
$this->db->select('id, model');
if($tree != NULL){
$this->db->where('brand_id', $tree);
}
$query = $this->db->get('models');
$models = array();
if($query->result()){
foreach ($query->result() as $model) {
$models[$model->id] = $model->model;
}
return $models;
} else {
return FALSE;
}
}
'$ this-> DB-> order_by ('모델') '? –