Welcome Guest, Not a member yet? Register   Sign In
How to display num_rows() and result() in the same Foreach loop
#4

[eluser]Gwarrior[/eluser]
Thanks for the replies, guys.

So for the left outer join, where 'blog_system' = post table name, and blog_categories = post category table, I should do it roughly as such? Below is what I have tried, and it is almost working, but its mixing categories and blog posts I believe. Could you help clean this up to work? Sorry... first left outer join.

Code:
function get_num_category() {
        $query = $this->db->query('SELECT category AS cat FROM blog_system LEFT OUTER JOIN blog_categories USING (category)');
        $query = $query->result();
        return $query;
    }


Messages In This Thread
How to display num_rows() and result() in the same Foreach loop - by El Forum - 08-30-2009, 11:52 AM



Theme © iAndrew 2016 - Forum software by © MyBB