Welcome Guest, Not a member yet? Register   Sign In
How can I made this ?? - begineer


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

[eluser]Michael Wales[/eluser]

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.

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

[eluser]Michael Wales[/eluser]
Models are your friend.

Theme © iAndrew 2016 - Forum software by © MyBB