Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: DBI / Mysql connections

by Anonymous Monk
on Dec 03, 2004 at 15:32 UTC ( [id://412155]=note: print w/replies, xml ) Need Help??


in reply to Re: DBI / Mysql connections
in thread DBI / Mysql connections

You can't really compare PHP with a Perl script.

PHP is usually run via a webserver and more precise via a module of the webserver, which will re-use certains processes/threads.
And only when something is re-used it can use an already made connection (so a script that is run via CGI can't re-use a connection made the previous time the page was loaded), using two connections from inside the same script would be possible but that isn't the default behaviour (or atleast not for a normal Perl script).

If you would run perl via the apache module mod_perl and you have loaded Apache::DBI then the default would be to use the connect method of Apache::DBI which will try to use a previous created connection

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://412155]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (2)
As of 2024-04-26 03:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found