$query = $this->db->query("SELECT * FROM orders WHERE status = 'complete' AND SUBSTRING(date_ordered, -4) = '2009' ORDER BY order_id ASC ");