
November 21st, 2002, 04:11 PM
|
|
Junior Member
|
|
Join Date: Oct 2002
Posts: 16
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
db connection 2-parter
Probably need a slapping for these...
I have created my first site in php with a new mysql db. All connections are being made where necessary and performing the correct sql INSERT, SELECT and DELETE functions where necessary.
My questions more relate to the most suitable design:
1. - In php am I required to explicitly close connections to a db. For example at the end of asp connections the db connection is 'switched off'. eg:
objConn.Close
Set objCComm = Nothing
Is this required by php or somehow done implicitly?
2. - In a site in which the user accesses a db on nearly all pges, at present I make a connection for each page.
Would it be more efficient to place a connection in the globals file (or create an include file with the connection string)?
|