CI Forum - get_where function for forum and topics |
Sorry for taking so long to reply. @jreklund yes your naming for the database stuff and the structure is clearer. I will definitely re-do mine after i learn what i wanted to do, but still as you said i can either check with if in the view, like this:
Code: <?php or get the result from those 2 tables in 1 query in the model. Can you show me how to do that? Code: public function get_categories() My structure is the following: The categories classic should be contained within categories. Categories contains ->categories_classic and categories_modern Categories_classic -> contains forums Categories_modern ->contains forums Forums -> contain topics The above code gets my categories and then it gets all the categories_classic which are equal to 2. This 2 should be the ID of categories, but i don't know how to pull the ID of categories in another function. How can i do that? And how can i do the thing u recommended? To get all the tables - categories, categories_classic and categories modern and check them all for their relations, and return a result. This way i won't be checking in the view. Thanks beforehand and happy new year! |
Welcome Guest, Not a member yet? Register Sign In |