'How to Sum Total Times in codeigniter from db

hy, i want to sum total times from my db then convert it number/sec, i try to do it like this

model

  public function hitungwaktu()
    {
        $date = date('Y.m.d', strtotime("0 days"));
        $this->db->select_sum('RStopTime');
        $this->db->from('RPA_POP_HSM');
        $this->db->where('RDate =', $date);
        $query = $this->db->get();
        return $result = $query->row();
    }

controller

    $data['coba'] = $this->landing->hitungwaktu();

but its generate error like this:

Message: Call to a member function row() on boolean

Filename: E:\Application\PE\POPHSM\application\models\Mod_landing.php

Line Number: 14

this is times format in my db

enter image description here

what i must to do ? and why thats happen ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source