Я делаю систему мониторинга. Моя цель — показать сумму и количество моих транзакций за день. Я предоставил скриншот моей цели. Любая помощь будет оценена по достоинству.
Просмотреть
Date
Total Transaction
Amount
Action
Контроллер
public function testing()
{
$list = $this->repo->function_etc();
$data = array();
$no = $_POST['start'];
foreach ($list as $person) {
$no++;
$row = array();
$row[] = $person->dateUp;
$row[] = number_format($person->amount);
$row[] = number_format($person->count);
$row[] ='dateUp.'" >View';
$data[] = $row;
}
$output = array(
"data" => $data,
);
echo json_encode($output);
}
Модель:
//maybe i'm missing something here?
private function function_etc()
{
$this->db->select('*');
$this->db->from($this->tableDashboard);
$this->db->where('transReference !=', '');
$this->db->where('trans_siteName','https://somewhere.com/');
$this->db->select_sum('tbl_transaction.amount');
$this->db->group_by('tbl_transaction.dateUp');
$query = $this->db->get();
return $query->result();
}
Подробнее здесь: https://stackoverflow.com/questions/684 ... display-it