[eluser]kikz4life[/eluser]
Code:
function getDetailList() //Show the list of registered user with company details
{
$item = $this->input->post('item');
$sortname = $this->input->post('sortname');
$sortorder = $this->input->post('sortorder');
if (!$sortname) $sortname = 'a.user_id';
if (!$sortorder) $sortorder = 'DESC';
$page = 1;
$this->db->start_cache();
$this->db->join('maint_company erp_b','a.company_id=b.company_id','left');
$this->db->from('sec_companyaccess erp_a');
$this->db->where('erp_a.user_id',$item);
$num = $this->db->count_all_results();
$this->db->select("a.company_access_id as pkey,a.company_access_id, b.company_code, b.company_name,a.company_id ");
$this->db->order_by($sortname,$sortorder);
$query = $this->db->get("sec_companyaccess erp_a");
$this->db->flush_cache();
$data['db'] = $query;
$data['page'] = $page;
$data['num'] = $num;
return $data;
}
help anyone. i've been working on a master-detail grid. But to be able to do this i must get the value of $item. If i replace the $item to 1 or 2, records display.
FYI: this is what my firebug gets:
Code:
{
page: 1,
total: 0,
rows: []
}
any pointers/ suggestion will do..
cheers to all.,