in my model
$this->db->select('message,TIMESTAMPDIFF(MINUTE,date_added,CURRENT_TIMESTAMP) AS minutes_passed');
$this->db->from('activity_logs');
$this->db->order_by('log_id','desc');
$this->db->limit(20);
$q = $this->db->get();
return $q->result_array();
in controller
$data['logs'] = $this->common_model->get_logs();
foreach ($data['logs'] as $k) {
echo 'total minutes'.$k['minutes_passed']."<br>";//output total minutes "21410"
}
i have total number of minutes and i want to get total hours related to minutes and then hours to convert into total days. i hope anyone can guide me through this. Thanks.