So use mysql_db_query()

On Mon, 22 Apr 2002, Matthew Walker wrote:

> Since I'm the one who started this, let me explain why I'm doing what I
> am.
>
> The code I'm writing is one-time use code, and I need ease-of-coding
> more than I need efficient use of resources. The code is devilishly
> complex as it is, and having to deal with selecting the db every two
> lines would just make it that much more complex.
>
> Matthew Walker
> Senior Software Engineer
> ePliant Marketing
>
>
> -----Original Message-----
> From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 22, 2002 10:30 AM
> To: Daniel Lorch
> Cc: Markus Fischer; Matthew Walker; [EMAIL PROTECTED]
> Subject: Re[2]: [PHP-DEV] Major Bug in multiple MySQL Connections?
>
> It's not a silly behaviour. Database connections are a very limited
> resource, much more so than open files, and time after time we saw code
> that would open up multiple identical connections for no reason
> whatsoever. This is especially true of large apps that are able to
> swallow
> other apps. Like PHP-Nuke with various plug-in modules. If you patch 3
> or
> 4 different things together that all talk to a DB on localhost, you do
> not
> need to go through the code and unify the database handling to avoid
> having 4 separate connections per request. PHP automatically optimizes
> that for you. Opening a new connection is also extremely expensive, much
> more so than a simple db switch call on an existing one.
>
> -Rasmus
>
> On Mon, 22 Apr 2002, Daniel Lorch wrote:
>
> > Hi,
> >
> > > No, it doesn't satisfy me at all.  Your application design is broken
> and
> > > forcing multiple identical connections doesn't solve it at all.  You
> are
> > > trying to associate a selected DB with a database connection
> artificially.
> >
> > a couple of years ago I was using PHPLIBs db-class and my own
> > db-class at the same time and I was wondering why these classes mixed
> > up result sets. After serveral nights of code-review I gave up and
> > rewrote most parts from scratch. I finally understand why it didn't
> > work (and don't ask me why I was using two different db-classes, I
> > can't remember).
> >
> > What's the rationale behind this silly behaviour? Do you also enforce
> > people to reuse file-handles?
> >
> > -daniel
> >
> >
> >
> > --
> > PHP Development Mailing List <http://www.php.net/>
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.345 / Virus Database: 193 - Release Date: 4/9/2002
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to