我想知道,如果有人可以帮助我的东西。
我有一点的Ajax调用在我的模型的功能。
但我不能似乎能够订购的“模式”的输出。
下面的有功能的IM麻烦
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;
}
}