?
Solved

re-connection to mysql (suggesstion)

Posted on 2002-03-29
5
Medium Priority
?
209 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 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

WordPress Tutorial 1: Installation & Setup

WordPress is a very popular option for running your web site and can be used to get your content online quickly for the world to see. This guide will walk you through installing the WordPress server software and the initial setup process.

Question has a verified solution.

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

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
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

777 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