epseix Posted March 30, 2013 Share Posted March 30, 2013 I have tried to google this, however I can't seem to find an answer (it might just be the way I'm describing it in search engine). I have numerous MySQL queries throughout my website. I had considered creating a separate php file with all queries (for easy-editing, if needed) and including it on every page and then calling the required query from while loop onwards etc. However, this MAY result in slower loading time - I don't know... I have also read about the possibility of using functions to call required query, but I don't understand what this means, let alone know how to code this. Can someone please advise me of "best practice" solution for my particular issue? Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/276333-separating-mysql-queries-in-other-file/ Share on other sites More sharing options...
epseix Posted March 30, 2013 Author Share Posted March 30, 2013 And possibly what to google for future reference... Quote Link to comment https://forums.phpfreaks.com/topic/276333-separating-mysql-queries-in-other-file/#findComment-1422013 Share on other sites More sharing options...
fenway Posted April 7, 2013 Share Posted April 7, 2013 Are you asking us what a PHP function is? Quote Link to comment https://forums.phpfreaks.com/topic/276333-separating-mysql-queries-in-other-file/#findComment-1423410 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.