Solved

re-connection to mysql (suggesstion)

Posted on 2002-03-29
5
207 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 100 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
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…
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…
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.

738 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