O'Reilly logo

CodeIgniter 1.7 by David Upton, Jose Argudo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Working with text—the text helper

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); ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required