how to get last record of the table using codeigniter code example
Example: get last row codeigniter
$query = $this->db->query("SELECT * FROM date_data ORDER BY id DESC LIMIT 1");
$result = $query->result_array();
return $result;
$query = $this->db->query("SELECT * FROM date_data ORDER BY id DESC LIMIT 1");
$result = $query->result_array();
return $result;