How can I made this ?? - begineer - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: How can I made this ?? - begineer (/showthread.php?tid=2508) |
How can I made this ?? - begineer - El Forum - 08-09-2007 [eluser]fejtis[/eluser] Hi i have maybe stupid question. I am thinking on the situation, where I have a web with CodeIgniter and in all pages I want to process something code (for example SQL query). So i must repeat that code in all controllers? Thx How can I made this ?? - begineer - El Forum - 08-09-2007 [eluser]Michael Wales[/eluser] wow... uhm - yes, you must write your own code. Let's say you want to have dinner and each night you want to eat something - do you have to cook it? In all seriousness, if it's the same SQL query you could just throw it in a model - but then, why would you have multiple controllers - sounds like a one page site to me. I think you just need to do some reading through the user guide and determine your actual question/needs - this is a fruitless discussion. How can I made this ?? - begineer - El Forum - 08-09-2007 [eluser]gafro[/eluser] i think he is trying to find out if there is a better more robust way of writing generic queries. rather than writing the same queries in every controller How can I made this ?? - begineer - El Forum - 08-09-2007 [eluser]Michael Wales[/eluser] Models are your friend. |