Welcome to WebmasterWorld Guest from 54.146.201.80

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Data base connections

i need some advise

     
9:44 pm on Jun 24, 2004 (gmt 0)

New User

10+ Year Member

joined:Apr 28, 2004
posts:24
votes: 0


i just want to know what is safer when developing a site, opening and closing a connection to a database only when it is needed or leaving the connection open for the duration of the usage to improve the speed of the site. if it is better to open and close the database connection all the time is safe to put the code into a include page as an object that can be created everytime the connection is used, with methods to open and close the connection?
3:33 am on June 25, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:June 3, 2004
posts:55
votes: 0


Use an include page for you db conection script and make it a php script (a php script with no print or echo statments will never be displayed by a browser).

Connecting to the db involoves opening a socket (which is more or less a secure connection).

But even with pconnect your connection is droped when the script page ends.

6:23 pm on June 25, 2004 (gmt 0)

New User

10+ Year Member

joined:Apr 28, 2004
posts:24
votes: 0


thanx for the advise :)
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members