The text
helper has a series of functions that help you to manipulate text in various ways. See the online user guide for details. I'd like to show you a few useful things you can do. We will see some of the functions while continuing with our example. Now, if we click on the link we will make a call to the show_day
function of the errors
controller. With little modifications to the get_errors_by_date
model function:
function get_errors_by_date($site_id = '', $year = '', $month = '', $day = '') { if(!empty($site_id)) { $this->db->where('site_id', $site_id); $this->db->select('site_id, DAY(date) as day, MONTH(date) as month, YEAR(date) as year, error, date'); if(!empty($year)) $this->db->where('YEAR(date)', $year); if(!empty($month)) $this->db->where('MONTH(date)', $month); if(!empty($day)) $this->db->where('DAY(date)', $day); $query = $this->db->get('error_logs'); return $query; } }
We can use the same function to retrieve...