?
Solved

re-connection to mysql (suggesstion)

Posted on 2002-03-29
5
Medium Priority
?
212 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
ID: 6905605
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
ID: 6905668
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 200 total points
ID: 6905682
I would Maintain the connection.
0
 
LVL 4

Expert Comment

by:lokeshv
ID: 6906712
no prblm in keeping connection open...

Lk
0
 

Author Comment

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

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses
Course of the Month14 days, 7 hours left to enroll

839 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