Welcome Guest, Not a member yet? Register   Sign In
controller and view not working correctly
#4

This is how i got it working for anyone who may be interested...

$cluster_task_id_count = array_count_values($cluster_task_ids);

$dates = new List_item();

$dates->where_in('user_list_id', $id)->where('item_date >=', $start)->where('item_date <=', $end)->order_by('item_date', 'asc')->get();

if($items->exists()) {
$data['item_count_item'] = $items->result_count();
$data['items'] = $items;
$data['dates'] = array();
foreach($dates AS $date)
{
$data['dates'][$date->id] = array('ctask_id' => $date->cluster_task_id,'item_date' => $date->item_date, 'cluster_tasks' => array());
$new_date=$date->cluster_task_id;
foreach($items AS $item)
{
for($count = 0; $count < $cluster_task_id_count[$item->id]; $count++)
{
$item->id; //217, then 218, then 218, then 219
if($item->id==$new_date)
{
$data['dates'][$date->id]['cluster_tasks'] = array(
'name' => $item->support_item
);
}
}
}
}
//print_r($data['dates']);
}
$data['start'] = $start;
$data['end'] = $end;
$this->cfd->build('diet/preview_claim', $data);
Reply


Messages In This Thread
RE: controller and view not working correctly - by scoobie - 06-18-2015, 04:31 AM



Theme © iAndrew 2016 - Forum software by © MyBB