Welcome Guest, Not a member yet? Register   Sign In
How can I pass a parameter to a view if it is not in the URL?
#2

You need to make a LEFT JOIN in your function that you return in $data['categories'].
Code:
SELECT categories.*,count(forums.category_id) AS number_of_posts FROM categories LEFT JOIN forums ON forums.category_id=categories.category_id GROUP BY categories.category_id
Reply


Messages In This Thread
RE: How can I pass a parameter to a view if it is not in the URL? - by jreklund - 05-20-2018, 07:59 AM



Theme © iAndrew 2016 - Forum software by © MyBB