Welcome Guest, Not a member yet? Register   Sign In
character limiter
#1

[eluser]benfike[/eluser]
Code:
function get_posts($options)
    {
        $short_title = character_limiter('post_title', 28);
        $short_intro = character_limiter('post_intro', 65);
        $this->db->select("*,YEAR(post_publicated_at) AS year,  
                             MONTH(post_publicated_at) AS month,
                             DAY(post_publicated_at) AS day,
                             ".$short_intro." AS short_intro,
                             ".$short_title." AS short_title");
        $this->db->join('posts', 'posts.post_id = posts_news.post_id');
        $this->db->where('posts.post_status','active');
        $this->db->where('posts_news.post_type',$options['post_type']);
        $this->db->where('posts.post_publicated_at <=', $this->_time);
        $this->db->order_by('posts_news.post_leading_article', 'desc');
        $this->db->order_by('posts.post_publicated_at', 'desc');
        $this->db->limit($options['limit'], $options['start']);
        return $this->db->get('posts_news')->result_array();
    }

why don't work the character limiter?
I have a post_title, post_intro field, but i have to character limit it as short_intro, short_title

Help me pls.


Messages In This Thread
character limiter - by El Forum - 02-22-2011, 05:47 AM



Theme © iAndrew 2016 - Forum software by © MyBB