How to get results from 2 tables in a database, using foreach within a foreach |
[eluser]Juan Velandia[/eluser]
Hello Everyone. Again I'm asking for help. I have 2 tables within a dabase: cms_section cms_article there's a url_section field in the two tables to relate articles and sections, and I'm trying to make a dynamic menu here it is: http://190.146.3.147/assa-seguros.com/ the thing is that i don't know how to tell the model wich article belongs to wich section. I've tried differente approaches but I finally decided to ask for help: Here's the controller Code: function index() the models Code: <? Code: <? Code: <div> I hope you can give some ideas, thanks in advance! |
Messages In This Thread |
How to get results from 2 tables in a database, using foreach within a foreach - by El Forum - 07-16-2010, 12:40 PM
How to get results from 2 tables in a database, using foreach within a foreach - by El Forum - 07-16-2010, 02:09 PM
How to get results from 2 tables in a database, using foreach within a foreach - by El Forum - 07-16-2010, 02:17 PM
How to get results from 2 tables in a database, using foreach within a foreach - by El Forum - 07-16-2010, 04:02 PM
How to get results from 2 tables in a database, using foreach within a foreach - by El Forum - 07-16-2010, 08:01 PM
How to get results from 2 tables in a database, using foreach within a foreach - by El Forum - 07-18-2010, 12:44 PM
|