leightr Posted July 1, 2007 Share Posted July 1, 2007 Is it a bad ideal to put all your queries in one include file? Same with Varibles? Rick Quote Link to comment https://forums.phpfreaks.com/topic/57969-solved-pulling-all-your-queries-in-one-basket/ Share on other sites More sharing options...
AndyB Posted July 1, 2007 Share Posted July 1, 2007 Why would you want all possible queries in an included file? That's the least flexible design imaginable. Quote Link to comment https://forums.phpfreaks.com/topic/57969-solved-pulling-all-your-queries-in-one-basket/#findComment-287322 Share on other sites More sharing options...
leightr Posted July 1, 2007 Author Share Posted July 1, 2007 I am pretty new to php. I figured it would be cool to call to the query rather than writting it again if I needed it. Quote Link to comment https://forums.phpfreaks.com/topic/57969-solved-pulling-all-your-queries-in-one-basket/#findComment-287326 Share on other sites More sharing options...
AndyB Posted July 1, 2007 Share Posted July 1, 2007 It makes more sense to construct your queries when needed, then execute them. A classic example would be pagination where you want a different sub-set of records depending on where you are in a 'page x of y' situation. Quote Link to comment https://forums.phpfreaks.com/topic/57969-solved-pulling-all-your-queries-in-one-basket/#findComment-287332 Share on other sites More sharing options...
leightr Posted July 1, 2007 Author Share Posted July 1, 2007 Thanks Andy Quote Link to comment https://forums.phpfreaks.com/topic/57969-solved-pulling-all-your-queries-in-one-basket/#findComment-287341 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.