It must be a joke. I program in PHP day in and day out - PHP and MySQL literally make up about 80% of my day, and I KNOW that PHP does NOT drop the MySQL connection at the end of every PHP block, unless you specifically tell it to close the connection each time. Instead, it normally will shut down the connection at the end of the SCRIPT, not the block.
You are correct in saying that it would be a joke - a cruel and slow joke if MySQL had to reconnect each time. You should only have to connect at the top of your script, and then you can run as many queries as you'd like until the script ends. - Jonathan -----Original Message----- From: Etienne Marcotte [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 13, 2001 1:13 PM To: markus|lervik Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Performance what?? that is a joke? I mean disconnectiong at every single little block ending? I just can't beleive it, probably you can put that in an inc file for connection, call the connect at the beginning of the script, and call disconnection at the end. It's impossible that you have to reconnect each time you want to prepare/execute something! I'm only coding perl so I don't know php at all, but I'm sure you can stay connected for at least all the time the same script is running... so many websites uses mysql/php... Etienne markus|lervik wrote: > > On Thu, 2001-12-13 at 22:16, Ron Jamison wrote: > > I'm fairly sure there's no difference in performance when using PHP > tags > > mixed with HTML blocks as you are doing. > > > > Think of it as PHP knowing that it should send everything not in <? ?> > tags > > directly to the browser. Like an echo or a print, but without needing > to > > specify calls to those functions. > > > > <HTML> > > <? echo $PHP_SELF ?> > > </HTML> > > > > <HTML> > > <?=$PHP_SELF?> > > </HTML> > > I'm not -that- worried about performance loss for switching between, > php and html, what annoys me (and would probably slow down performance > quite a bit), is that every time I have to do a database query, I have > to use mysql_connect again, because as Prottoss pointed out, PHP drops > the connection every time a PHP-block ends. > > Not that it is that a big issue for my particular application, but > knowing a workaround to this problem would be quite useful in the > future. > > > Cheers, > Markus > > -- > Markus Lervik > Linux administrator with a kungfoo grip > Vasa City Library - Public Library > > --------------------------------------------------------------------- > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php -- Etienne Marcotte Specifications Management - Quality Control Imperial Tobacco Ltd. - Montreal (Qc) Canada 514.932.6161 x.4001 --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php