[eluser]developer10[/eluser]
Maybe this needs some clarification. I have a feeling that this can be done.
In my DB i have table job_categories and job_subcategories. Those records in the latter table contain subctg_id and ctg_id (id of their parent).
Now, in my model, i query all categories and show them in my view, using foreach loop.
In the middle of that loop, i'm want another loop to be placed (this one shows subcategories of respective category).
Query for subcategories is also in that model file. But the problem is that i only can pass one parameter to the model, so i always get stuck with the very same subcategories below each category (those with ctg_id = 1, or 2, or 3, etc.).
I've managed to solve my problem by pure PHP while loop and sql query in the view file, but that is not satisfying enough for me. I'd like to have all queries in model files.
So, does anyone have any idea how to solve this?