ive made a Query object, which just tidies up all my databse work a bit. the thing is, i debated whether to make a new connection in the constructor method because i thought it would be inefficient to make a new link resource with every new query made. Currently i have the connection outside the object, and i just do a manual connection at the top of every page, before making any queries. Am i right in doing this? It would make stuff a bit tidier if it connected within the constructor method of the object, but im not doing it if its gonna sap performance. any thoughts?
Cheers
Rich