>From what I read about the module, it overrides connect() and checks if the
connection has already been made. Overrides disconnect to not actually
disconnect. Pretty darn nifty.
--John
-----Original Message-----
From: Rob Tanner [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 12, 2000 10:53 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Problems with Apache::DBI
Believe it or not, it's the simplest task in the world. In startup.pl add
the line "PerlModule Apache::DBI" I'm not sure how it does it's magic, but
basically, with that module loaded, DBI connection open/close requests go
through it and it maintains a persistant connection for you (the close is
replaced with a null, etc, so you don't even have to modify your banner
module. If you've installed Apache::DBI, simply grab the manpage, but
basically, all you do is add it to startup.pl. Neat, ain't it!! :-)
-- Rob
--On Monday, June 12, 2000 12:14 PM +0000 [EMAIL PROTECTED] wrote:
> Hello,
> This message is urgent and could save our banner exchange.
> Recently we started growing so fast that we had to convert our entire
> system at Traffic-Exchange.com to mysql. Now that this is done we need
> persistant database connections to the mysql server. From downloading
> the Apache::DBI module I have no idea how to set this up.
>
> But what I can tell you is that we connect to the mysql database 1 time
> for every banner that is called by having this in our perl script:
> use DBI;
> $dbh =
> DBI->connect("dbi:mysql:$mysqldatabase","$mysqlusername","$mysqlpassword"
> ) || die("Couldn't connect to database!\n");
> &updatedatabase;
> $dbh->disconnect;
>
> Each time a banner is called that code is execuited meaning the database
> would open over 1,000 in a few min.
>
> From seeng this how is it that I can change this to use your module for
> persistant connections and what is it I need to do.
>
> The README was a bit confusing.
_ _ _ _ _ _ _ _ _ _
/\_\_\_\_\ /\_\ /\_\_\_\_\_\
/\/_/_/_/_/ /\/_/ \/_/_/_/_/_/ QUIDQUID LATINE DICTUM SIT,
/\/_/__\/_/ __ /\/_/ /\/_/ PROFUNDUM VIDITUR
/\/_/_/_/_/ /\_\ /\/_/ /\/_/
/\/_/ \/_/ /\/_/_/\/_/ /\/_/ (Whatever is said in Latin
\/_/ \/_/ \/_/_/_/_/ \/_/ appears profound)
Rob Tanner
McMinnville, Oregon
[EMAIL PROTECTED]