php-general Digest 3 Apr 2006 12:10:08 -0000 Issue 4050

Topics (messages 233091 through 233112):

Re: microsoft PHP ?
        233091 by: Chris Shiflett
        233092 by: Joe Wollard
        233093 by: Matt Richards
        233094 by: Matt Richards
        233095 by: Joe Wollard
        233108 by: Ryan A

Looping information into a table
        233096 by: benifactor
        233097 by: Chris

Best authentication method for user
        233098 by: Alain Roger
        233099 by: Chris
        233100 by: Alain Roger
        233102 by: Chris
        233105 by: Ligaya Turmelle
        233107 by: Alain Roger
        233110 by: Chris
        233111 by: Alain Roger

Re: return path of mail function
        233101 by: sub.drewpydraws.com
        233103 by: Chris
        233104 by: sub.drewpydraws.com

QUARANTINED: Mail System Error - Returned Mail
        233106 by: WorkgroupMail Content Filter

PHP AJAX Framework - Suggestions Please
        233109 by: andreil1.starlett.lv

Re: MySQL close connection, what's the purpose?
        233112 by: tedd

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        php-general@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
Joe Wollard wrote:
I made fun of Chris and Rasmus specifically because I
know they're on this list.

I appreciate being considered important enough to make fun of.

Thanks! :-)

Chris

--- End Message ---
--- Begin Message ---
Just as long as everyone knows that everything I said was all in good fun.
Next time I'll be sure to use <sarcasam> just to be sure nothing is taken
the wrong way ;-)

On 4/2/06, Chris Shiflett <[EMAIL PROTECTED]> wrote:
>
> Joe Wollard wrote:
> > I made fun of Chris and Rasmus specifically because I
> > know they're on this list.
>
> I appreciate being considered important enough to make fun of.
>
> Thanks! :-)
>
> Chris
>

--- End Message ---
--- Begin Message ---
quote:
Joe Wollard wrote:
Just as long as everyone knows that everything I said was all in good fun.</sarcasam> Next time I'll be sure to use <sarcasam> just to be sure nothing is taken the wrong way ;-)

Joe Wollard wrote:
Just as long as everyone knows that everything I said was all in good fun. Next time I'll be sure to use <sarcasam> just to be sure nothing is taken the wrong way ;-)

On 4/2/06, *Chris Shiflett* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    Joe Wollard wrote:
    > I made fun of Chris and Rasmus specifically because I
    > know they're on this list.

    I appreciate being considered important enough to make fun of.

    Thanks! :-)

    Chris



--- End Message ---
--- Begin Message ---
oops forgot the first <sarcasam> .. oh well! :(

Matt Richards wrote:
quote:
Joe Wollard wrote:
Just as long as everyone knows that everything I said was all in good fun.</sarcasam> Next time I'll be sure to use <sarcasam> just to be sure nothing is taken the wrong way ;-)

Joe Wollard wrote:
Just as long as everyone knows that everything I said was all in good fun. Next time I'll be sure to use <sarcasam> just to be sure nothing is taken the wrong way ;-)

On 4/2/06, *Chris Shiflett* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    Joe Wollard wrote:
    > I made fun of Chris and Rasmus specifically because I
    > know they're on this list.

    I appreciate being considered important enough to make fun of.

    Thanks! :-)

    Chris




--- End Message ---
--- Begin Message ---
el-oh-el. See, I forgot already. Good lookin' out Matt!

On 4/2/06, Matt Richards <[EMAIL PROTECTED]> wrote:
>
> oops forgot the first <sarcasam> .. oh well! :(
>
> Matt Richards wrote:
> > quote:
> > Joe Wollard wrote:
> >   Just as long as everyone knows that everything I said was all in
> > good fun.</sarcasam>
> >   Next time I'll be sure to use <sarcasam> just to be sure nothing is
> > taken the wrong way ;-)
> >
> > Joe Wollard wrote:
> >> Just as long as everyone knows that everything I said was all in good
> >> fun. Next time I'll be sure to use <sarcasam> just to be sure nothing
> >> is taken the wrong way ;-)
> >>
> >> On 4/2/06, *Chris Shiflett* <[EMAIL PROTECTED]
> >> <mailto:[EMAIL PROTECTED]>> wrote:
> >>
> >>     Joe Wollard wrote:
> >>     > I made fun of Chris and Rasmus specifically because I
> >>     > know they're on this list.
> >>
> >>     I appreciate being considered important enough to make fun of.
> >>
> >>     Thanks! :-)
> >>
> >>     Chris
> >>
> >>
> >
>
>

--- End Message ---
--- Begin Message ---
Hey,
> Just as long as everyone knows that everything I said was all in good
> fun. Next time I'll be sure to use <sarcasam> just to be sure nothing
> is taken the wrong way ;-)Its quite strange actually how touchy so many
people have gotten... becauseas I read the whole "comeback joke" I thought
it was pretty damn funny anddidnt think anyone would misunderstand it as
anything other than a joke, didnt really think there is/was a need for
<sarcasm> tags either, if you're on the listfor some time you see that
Chris/Rasmus and nearly everyone else has a sense ofhumour...they take the
time to help us lowly "php problem thread starters" dont they? Maybe its all
stress... take it easy guysCheers!

--- End Message ---
--- Begin Message ---
i am creating a forum and i am having trouble getting the database information 
in to an html table

i believe it has somthing to do with the placement of the while loops because 
they repeat the segment of code over untill the statment returns false, thus 
adding extra html.. you guys are the experts so if you could help i would 
appreaciate it. i will give you the code and an example of how its shows up and 
then how i need it to show up and if you could point me in the right direction 
it would be awsome...


//code
<?
$query = mysql_query("select * from cforum");
while ($query1 = mysql_fetch_array($query)) {
$lid = $query1[id];

$query2 = mysql_query("select * from scforum where cfid = '$lid'");
while ($query3 = mysql_fetch_array($query2)) {

?>
<table width="94%" border="-1" bordercolor="black" cellspacing="1" 
cellpadding="0" align="center">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0" 
bgcolor="#ff6600">
<tr>
<td><font face="tahoma" size="1" color="white"><?php echo("<font face =tahoma 
color=black size=1><b>$query1[cname];</b></font><br>"); ?></font></td>
<td align="right"><font face="tahoma" size="1" color="white">Forum Mods Will Go 
Here</font></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table width="98%" border="0" cellspacing="2" cellpadding="0" align="center">
<tr>
<td><font face="tahoma" color="black" size="1">
<?php echo("<font face =tahoma color=black size=1><b>--> Topic Name: 
</b>$query3[scname] <br> <b>--> Topic Description:</b> $query3[scdesc]<br>"); ?>

</td>
</tr>                                                    
</table>
</td>
</tr>
</table><br>



<?
}
} 

?>

//end code

//here is how it displays

            General;
           Forum Mods Will Go Here 
     
            --> Topic Name: General 
            --> Topic Description: blagh l adsklhdfkhadklfhaklsdhf sdhlkh
           
     



            Other;
           Forum Mods Will Go Here 
     
            --> Topic Name: Other 
            --> Topic Description: sdfdsjl;asdf
           
     



            Other;
           Forum Mods Will Go Here 
     
            --> Topic Name: Another Other
            --> Topic Description: sdafkasdhkdhas
           
     



            other;
           Forum Mods Will Go Here 
     
            --> Topic Name: yet another other
            --> Topic Description: Talk about all aspects of other. oh wait 
There is another forum just for that!
           
     



            Bug Reports;
           Forum Mods Will Go Here 
     
            --> Topic Name: Web Site Bug Reports 
            --> Topic Description: Report bugs here. Please include information 
like, how the problem was encountered, the nature of the bug e.x. Spelling 
error on the forum page". Please give us steps on how to re-create the bug so 
we can fix it.
           
     


// see this looks ok, but the 'others' should be grouped together....

like this
            Other; forum Mods Will Go Here 
            --> Topic Name: Another Other
            --> Topic Description: sdafkasdhkdhas 
     
            --> Topic Name: Other 
            --> Topic Description: sdfdsjl;asdf
           
     
            --> Topic Name: yet another other
                  --> Topic Description: Talk about all aspects of other. oh 
wait There is another forum just for that!
                 
           
     

 if you get what i mean and can offer any help i would appreaciate it thank you 
in advance!

--- End Message ---
--- Begin Message ---
benifactor wrote:
i am creating a forum and i am having trouble getting the database information 
in to an html table

i believe it has somthing to do with the placement of the while loops because 
they repeat the segment of code over untill the statment returns false, thus 
adding extra html.. you guys are the experts so if you could help i would 
appreaciate it. i will give you the code and an example of how its shows up and 
then how i need it to show up and if you could point me in the right direction 
it would be awsome...

It sure is. You're printing out the heading over and over again inside the second loop.

try this code:

http://pastebin.com/637039

I don't know if it was a mail problem, but can I suggest you indent your code, it makes it so much easier to see where your loops are.

--
Postgresql & php tutorials
http://www.designmagick.com/

--- End Message ---
--- Begin Message ---
 Hi,

I would like to use a secure way how my user is authenticated.
For that i was thinking to use session and register his login and password
as session variable. Like that, when he will need to execute a query he will
not have to type again everything but application will do it alone.

What do you think about that ?

Moreover, it should exist a default user with which, everybody will be able
to execute some basic queries.

i was thinking to store this login and password in hardcoding in some text
file that will be used at the first web page (some file that i will include
in my PHP code).... after everything will be managed by PHP sessions and
variables.

i know that hardcoding is not the best secured solution, but really default
user should not enter his login and password. So how can i do that ?

thanks a lot for your answers.
Alain

--- End Message ---
--- Begin Message ---
Alain Roger wrote:
 Hi,

I would like to use a secure way how my user is authenticated.
For that i was thinking to use session and register his login and password
as session variable. Like that, when he will need to execute a query he will
not have to type again everything but application will do it alone.

What do you think about that ?

Moreover, it should exist a default user with which, everybody will be able
to execute some basic queries.

i was thinking to store this login and password in hardcoding in some text
file that will be used at the first web page (some file that i will include
in my PHP code).... after everything will be managed by PHP sessions and
variables.

i know that hardcoding is not the best secured solution, but really default
user should not enter his login and password. So how can i do that ?

What exactly is your application doing? We can't really give much advice if we don't know what it's for.

--
Postgresql & php tutorials
http://www.designmagick.com/

--- End Message ---
--- Begin Message ---
IN fact, i would like to have 2 profiles.

1 as common user :
everybody should use this profile, to browse website and execute common
queries.

1 as poweruser :
this profile will require a logon in some ssl webpage. it is use to
update/administrate database.

for sure, people with poweruser profile should log-in, so they will type
login and their password.

however, the users profile do not have any reason to type login and
password, they should only browse the website.
their login and password will be only use to execute stored
procedures/queries.
that's why i would like to find a way how to secure it enough but login and
password should come from somewhere.

the application : a simple MySQL-PHP website for cosmetics services. (so
prices, info, appointment reservation,..)

does it help you ?

Alain



On 4/3/06, Chris <[EMAIL PROTECTED]> wrote:
>
> Alain Roger wrote:
> >  Hi,
> >
> > I would like to use a secure way how my user is authenticated.
> > For that i was thinking to use session and register his login and
> password
> > as session variable. Like that, when he will need to execute a query he
> will
> > not have to type again everything but application will do it alone.
> >
> > What do you think about that ?
> >
> > Moreover, it should exist a default user with which, everybody will be
> able
> > to execute some basic queries.
> >
> > i was thinking to store this login and password in hardcoding in some
> text
> > file that will be used at the first web page (some file that i will
> include
> > in my PHP code).... after everything will be managed by PHP sessions and
> > variables.
> >
> > i know that hardcoding is not the best secured solution, but really
> default
> > user should not enter his login and password. So how can i do that ?
>
> What exactly is your application doing? We can't really give much advice
> if we don't know what it's for.
>
> --
> Postgresql & php tutorials
> http://www.designmagick.com/
>

--- End Message ---
--- Begin Message ---
Alain Roger wrote:
IN fact, i would like to have 2 profiles.

1 as common user :
everybody should use this profile, to browse website and execute common queries.

1 as poweruser :
this profile will require a logon in some ssl webpage. it is use to update/administrate database.

for sure, people with poweruser profile should log-in, so they will type login and their password.

however, the users profile do not have any reason to type login and password, they should only browse the website. their login and password will be only use to execute stored procedures/queries. that's why i would like to find a way how to secure it enough but login and password should come from somewhere.

the application : a simple MySQL-PHP website for cosmetics services. (so prices, info, appointment reservation,..)

I'd do it like this..

A non-logged-in user should only be doing searching, browsing categories, possibly adding to a shopping cart (if it exists).

A logged-in user can make appointments.

A super-user can change prices, make new categories and so on (in your admin area).

Store details in the db & session - or for a shopping cart, in a cookie so they can come back later and complete a purchase.


On 4/3/06, *Chris* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    Alain Roger wrote:
     >  Hi,
     >
     > I would like to use a secure way how my user is authenticated.
     > For that i was thinking to use session and register his login and
    password
     > as session variable. Like that, when he will need to execute a
    query he will
     > not have to type again everything but application will do it alone.
     >
     > What do you think about that ?
     >
     > Moreover, it should exist a default user with which, everybody
    will be able
     > to execute some basic queries.
     >
     > i was thinking to store this login and password in hardcoding in
    some text
     > file that will be used at the first web page (some file that i
    will include
     > in my PHP code).... after everything will be managed by PHP
    sessions and
     > variables.
     >
     > i know that hardcoding is not the best secured solution, but
    really default
     > user should not enter his login and password. So how can i do that ?

    What exactly is your application doing? We can't really give much
    advice
    if we don't know what it's for.

    --
    Postgresql & php tutorials
    http://www.designmagick.com/




--
Postgresql & php tutorials
http://www.designmagick.com/

--- End Message ---
--- Begin Message ---

For that i was thinking to use session and register his login and password
as session variable.

What do you think about that ?

I personally would only hold a password for as long as it is needed to log them in. Then I'd set a session var that they have logged in and another session var for their level of access.

But that's me.


--

life is a game... so have fun.

--- End Message ---
--- Begin Message ---
ok, but how to make a non-logged user executes some stored procedures or
Queries ?
MySQL will need some login and password for that.

so, that's why i've asked such question...how and where to store this
non-logged user's info (login, password) to not make physical user type them
? (this must be secured enough)

thanks a lot,
Alain

On 4/3/06, Ligaya Turmelle <[EMAIL PROTECTED]> wrote:
>
>
> > For that i was thinking to use session and register his login and
> password
> > as session variable.
>
> > What do you think about that ?
> >
> I personally would only hold a password for as long as it is needed to
> log them in.  Then I'd set a session var that they have logged in and
> another session var for their level of access.
>
> But that's me.
>
>
> --
>
> life is a game... so have fun.
>
>
>

--- End Message ---
--- Begin Message ---
On 4/3/06, Alain Roger <[EMAIL PROTECTED]> wrote:
> ok, but how to make a non-logged user executes some stored procedures or
> Queries ?
> MySQL will need some login and password for that.
>
> so, that's why i've asked such question...how and where to store this
> non-logged user's info (login, password) to not make physical user type them
> ? (this must be secured enough)

A config file:

<?php
define('DB_USER', 'xxx');
......
?>

You don't want to make your users know your database details!

> On 4/3/06, Ligaya Turmelle <[EMAIL PROTECTED]> wrote:
> >
> >
> > > For that i was thinking to use session and register his login and
> > password
> > > as session variable.
> >
> > > What do you think about that ?
> > >
> > I personally would only hold a password for as long as it is needed to
> > log them in.  Then I'd set a session var that they have logged in and
> > another session var for their level of access.
> >
> > But that's me.
> >
> >
> > --
> >
> > life is a game... so have fun.
> >
> >
> >
>
>


--
Postgresql & php tutorials
http://www.designmagick.com/

--- End Message ---
--- Begin Message ---
I suppose that this config file should be included in all PHP file via
include command.
is it true ?

On 4/3/06, chris smith <[EMAIL PROTECTED]> wrote:
>
> On 4/3/06, Alain Roger <[EMAIL PROTECTED]> wrote:
> > ok, but how to make a non-logged user executes some stored procedures or
> > Queries ?
> > MySQL will need some login and password for that.
> >
> > so, that's why i've asked such question...how and where to store this
> > non-logged user's info (login, password) to not make physical user type
> them
> > ? (this must be secured enough)
>
> A config file:
>
> <?php
> define('DB_USER', 'xxx');
> ......
> ?>
>
> You don't want to make your users know your database details!
>
> > On 4/3/06, Ligaya Turmelle <[EMAIL PROTECTED]> wrote:
> > >
> > >
> > > > For that i was thinking to use session and register his login and
> > > password
> > > > as session variable.
> > >
> > > > What do you think about that ?
> > > >
> > > I personally would only hold a password for as long as it is needed to
> > > log them in.  Then I'd set a session var that they have logged in and
> > > another session var for their level of access.
> > >
> > > But that's me.
> > >
> > >
> > > --
> > >
> > > life is a game... so have fun.
> > >
> > >
> > >
> >
> >
>
>
> --
> Postgresql & php tutorials
> http://www.designmagick.com/
>

--- End Message ---
--- Begin Message ---
Safe mode is indeed off and sendmail_from has "no value". I've modified the
code as below:

$return="test@test.com";
$orig_sendmail_from = ini_get('sendmail_from');
ini_set('sendmail_from', $return);

$headers =  "From: Test <test@test.com>\r\n" .
   "Reply-To: Test <test@test.com>\r\n";

$sub="Test sub";
$msg="Test msg";
$to="[EMAIL PROTECTED]";

mail($to, $sub, $msg, $headers);

Still doesn't work. I also tried modifying the5th argument as
"[EMAIL PROTECTED]" and "[EMAIL PROTECTED]" neither of those worked either.

I'm not sure what i'm missing here. If it would help to view the phpinfo
from my host, you may do so here http://drewpydraws.com/phpinfo.php

~Drew
www.drewpydraws.com

----- Original Message ----- 
From: "Chris" <[EMAIL PROTECTED]>
To: "Andrew Darrow" <[EMAIL PROTECTED]>
Cc: <php-general@lists.php.net>
Sent: Sunday, April 02, 2006 5:02 PM
Subject: Re: [PHP] return path of mail function


> Andrew Darrow wrote:
> > I'm having a problem setting the return-path using the mail function. I
seem to be able to modify any of the other header information I want, but
not this one item.
> >
> > Here's my code:
> > $headers =  "Return-Path: Test <test@test.com>\r\n" .
> >    "From: Test <test@test.com>\r\n" .
> >    "Reply-To: Test <test@test.com>\r\n";
> >
> > $sub="Test sub";
> > $msg="Test msg";
> >
> > $to="[EMAIL PROTECTED]";
> >
> > mail($to, $sub, $msg, $headers, '-f test@test.com');
>
> No space between -f and the email.
>
> I assume your host doesn't have safe-mode on? (You can't use this method
> if so).
>
> Check a phpinfo page and look for:
>
> sendmail_from
>
> If that's set, this way won't do it either, you'll need to do:
>
> $orig_sendmail_from = ini_get('sendmail_from');
>
> // this should match what phpinfo tells you but replace the email. so
> might be '-f'.$return_path
> ini_set('sendmail_from', $return_path);
>
> mail($to, $sub, $msg, $headers);
>
> and leave off the last parameter.
>
> -- 
> Postgresql & php tutorials
> http://www.designmagick.com/
>
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
>
> -- 
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.385 / Virus Database: 268.3.4/299 - Release Date: 3/31/2006
>
>

--- End Message ---
--- Begin Message ---
[EMAIL PROTECTED] wrote:
Safe mode is indeed off and sendmail_from has "no value". I've modified the
code as below:

$return="test@test.com";
$orig_sendmail_from = ini_get('sendmail_from');
ini_set('sendmail_from', $return);

$headers =  "From: Test <test@test.com>\r\n" .
   "Reply-To: Test <test@test.com>\r\n";

$sub="Test sub";
$msg="Test msg";
$to="[EMAIL PROTECTED]";

mail($to, $sub, $msg, $headers);

What headers do you get when you do this?

--
Postgresql & php tutorials
http://www.designmagick.com/

--- End Message ---
--- Begin Message ---
The same as before:

Return-path: <[EMAIL PROTECTED]>
Envelope-to: [EMAIL PROTECTED]
Delivery-date: Mon, 03 Apr 2006 00:35:34 -0500
Received: from nobody by amsterdam.servershost.net with local (Exim 4.52)
 id 1FQHiw-0000Kf-E4
 for [EMAIL PROTECTED]; Mon, 03 Apr 2006 00:35:34 -0500
To: [EMAIL PROTECTED]
Subject: Test sub
X-PHP-Script: www.drewpydraws.com/crap.php for ip address
From: Test <test@test.com>
Reply-To: Test <test@test.com>
Message-Id: <[EMAIL PROTECTED]>
Date: Mon, 03 Apr 2006 00:35:34 -0500
X-Antivirus: AVG for E-mail 7.1.385 [268.3.4/299]
Mime-Version: 1.0
Content-Type: text/plain


~Drew
www.drewpydraws.com
----- Original Message ----- 
From: "Chris" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <php-general@lists.php.net>
Sent: Sunday, April 02, 2006 10:31 PM
Subject: Re: [PHP] return path of mail function


> [EMAIL PROTECTED] wrote:
> > Safe mode is indeed off and sendmail_from has "no value". I've modified
the
> > code as below:
> >
> > $return="test@test.com";
> > $orig_sendmail_from = ini_get('sendmail_from');
> > ini_set('sendmail_from', $return);
> >
> > $headers =  "From: Test <test@test.com>\r\n" .
> >    "Reply-To: Test <test@test.com>\r\n";
> >
> > $sub="Test sub";
> > $msg="Test msg";
> > $to="[EMAIL PROTECTED]";
> >
> > mail($to, $sub, $msg, $headers);
>
> What headers do you get when you do this?
>

--- End Message ---
--- Begin Message ---
The message "Mail System Error - Returned Mail" from Mail Administrator, sent 
on 4/3/2006 05:26 was quarantined because it contained either an executable 
file, a batch file or a screen saver file. All of these types of attachments 
are considered security risks. Please consult your mail administrator who can 
release the message.

This message was checked by MailScan for WorkgroupMail.
www.workgroupmail.com 

--- End Message ---
--- Begin Message ---
Hi,

Anyone can suggest me which PHP AJAX framework you are using, for what
reason(s), what are pros and cons of your particular choice.

I found many, and now facing difficult choice.

BTW, how do you pass session id between calls to PHP from JavaScript (cookies
or explicit foo.php?PHPSESSSIONID=blahblahblah)?

Thanks in advance for any suggestion(s).

Andrei


PS. Posted this question before, but got only one suggestion so far from Greg Beaver (PEAR_HTMP_AJAX). Would be very pleased to get an insight for more alternatives, like AJASON, for example.
--- End Message ---
--- Begin Message ---
chris said:

Time. Opening a db connection is time consuming. There are many levels
involved (making the connection, authentication, etc).. Even worse if
the connection is over tcp/ip because that overhead comes in on top as
well.

I replied:

Have you timed it?

Maybe I'll do that tomorrow.

Okay, I performed a test that made 100 queries, and found that it took about four times as long to open a dB connection each time and get the data as it did to open it once. In other words, if your script pulls data from a dB 100 times, then making a connection to the dB once, pulling the data, and then closing the dB is four times as fast as opening the dB, pulling the data, and closing the dB in sequence one hundred times.

Now, that sounds like you should open your dB at the start of your script and just leave it open until the your script quits (as the original poster suggested), but there's a few thing to consider here.

1. The total time difference shown in the above test is a little over a tenth of a second.

2. By keeping the dB open, you're actually tying up the resources of the server more than necessary. After all, your script will always run longer than the query, right?

3. Most scripts (I'm guess here) don't access the dB 100 times or more -- so doing is less, means less of a difference.

4. And lastly, by closing the dB in your script when you're done with it, allows the server to use it's resources to "clean-up" quicker and have more time to be responsive to other queries.

So, not that you implied otherwise, I still don't see any convincing argument as to why one should open a dB at the start of a script and not close it as the original poster asked. Furthermore, not that I'm anyone special, but if I was overlooking someone's code who did that, I wouldn't think favorably of the technique -- it would appear as sloppy programming to me.

tedd

--
--------------------------------------------------------------------------------
http://sperling.com

--- End Message ---

Reply via email to