_giles_ Posted February 5, 2007 Share Posted February 5, 2007 Hi, I’ve just finished my first development. Each page load is querying my database approx. 6 times from various stages including functions and classes etc. At this time, a connection is being made each time one of these queries is run. Everything works great, but I can’t help wondering if this is the most efficient way of operating? - for example, would it be possible / more efficient to create a single connection and pass it to each query? I’d appreciate any comments or thoughts Giles Quote Link to comment Share on other sites More sharing options...
paul2463 Posted February 5, 2007 Share Posted February 5, 2007 you should only need to write the connections script once and all the queries on the page can use it, either write the connections cript once at the top of a page or better still write in on its own .php page and include it in you page Quote Link to comment Share on other sites More sharing options...
_giles_ Posted February 5, 2007 Author Share Posted February 5, 2007 Oh yes .... much better. Thanks for the replay and neat idea to put in include file ... where would us newbies be without the help of the more experoanced. thank you Quote Link to comment 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.