Solved

re-connection to mysql (suggesstion)

Posted on 2002-03-29
5
202 Views
Last Modified: 2012-05-04
how is mysql api for php configured..

i want to open the database a couple of time in my long script(php file).

-whether i should open it once i keep it open through out the script

-or re-connect & then disconnect each time
0
Comment
Question by:sjehanzeb
  • 2
  • 2
5 Comments
 
LVL 5

Expert Comment

by:andriv
Comment Utility
How long between connects, if it's a matter of a couple seconds leave open. If it's long periods of time then close.

Leaving it open reduces overhead but leaving open for a long period of time is a security concern.
0
 

Author Comment

by:sjehanzeb
Comment Utility
the file is about 700+ lines but not all of it is process caz they are function although it show about .3 to .4 sec avg loading time on my iis(winxp) AMD 450Mhz
0
 
LVL 5

Accepted Solution

by:
andriv earned 100 total points
Comment Utility
I would Maintain the connection.
0
 
LVL 4

Expert Comment

by:lokeshv
Comment Utility
no prblm in keeping connection open...

Lk
0
 

Author Comment

by:sjehanzeb
Comment Utility
i have given average answer so the any user can get the answer with cheap point
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now