![]() |
How to GET number of posts for each category with type category_post in the view - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=31) +--- Thread: How to GET number of posts for each category with type category_post in the view (/showthread.php?tid=83017) |
How to GET number of posts for each category with type category_post in the view - optic4predator1 - 09-11-2022 hello team, I'm working on a project using Codeigniter and I want to display the following data by showing the number of data in real time. I have a TABLE named POST which contains id, title, content, category_id and a TABLE named CATEGORY which contains id, category_name, category_type. So i would like to display the total of POSTS recorded for each CATEGORY selected in the request, because the CATEGORY table is used for other tables, so I want to have just categories which relates to POSTS, the query is fine but i dont know how to send the data to the view. I have difficulties about how to display data in VIEW here an image on how I want to have the data, any help will be appreciated Thank you for your assistance, my respects Code: here is my Model RE: How to GET number of posts for each category with type category_post in the view - JustJohnQ - 09-12-2022 Change Code: <tr> To: Code: <tr> |