Welcome Guest, Not a member yet? Register   Sign In
Simple Question: Expanding on the Blog Tutorial
#5

[eluser]atno[/eluser]
Try this code
Code:
function total_comments()
    {
        $query = $this->db->get_where('comments',array('entry_id' => $this->uri->segment(3)));
        echo $query->num_rows();
    }
Will return number of rows fetched from table comments for the entry your are trying to display.

Edit: i don't have the time to create the blog tutorial again so i haven't test this code


Messages In This Thread
Simple Question: Expanding on the Blog Tutorial - by El Forum - 02-13-2010, 05:56 AM
Simple Question: Expanding on the Blog Tutorial - by El Forum - 02-13-2010, 06:43 AM
Simple Question: Expanding on the Blog Tutorial - by El Forum - 02-13-2010, 03:59 PM
Simple Question: Expanding on the Blog Tutorial - by El Forum - 02-14-2010, 01:59 PM
Simple Question: Expanding on the Blog Tutorial - by El Forum - 02-15-2010, 04:45 AM



Theme © iAndrew 2016 - Forum software by © MyBB