On Sun, 4 Jun 2000, Tim Bunce wrote:

> On Sat, Jun 03, 2000 at 03:54:37AM +0300, Stas Bekman wrote:
> > Here is a complete version. comments are very welcome before it enters the
> > guide:
> > 
> > The first example is the C<DBI> module. As you know C<DBI> works with
> > many database drivers falling into the C<DBD::> category,
> > e.g. C<DBD::mysql>. It's not enough to preload C<DBI>, you should
> > initialize C<DBI> with driver(s) that you are going to use (usually a
> > single driver is used).
> 
> ... if you want to minimize memory use after forking.
> 
> I'd rather not create the impression that people "should" initialize
> drivers in other circumstances.

Perfect! Will correct this. Thanks!

> > You probably know already that under mod_perl you should use the
> > C<Apache::DBI> module to get the connection persistence, unless you
> > open a separate connection for each user--in this case you should not
> > use this module. C<Apache::DBI> automatically loads C<DBI> and
> > overrides all it's methods, so you should continue coding like there
> > is only a C<DBI> module.
> 
> s/all it's methods/some of its methods/.

right!

> > =item option 4
> > 
> > Tell Apache::DBI to connect to the database when the child process
> > starts (ChildInitHandler), no driver is preload before the child gets
> > spawned!
> > 
> >   Apache::DBI->connect_on_init('DBI:mysql:test::localhost',
> >                              "",
> >                              "",
> >                              {
> >                               PrintError => 1, # warn() on errors
> >                               RaiseError => 0, # don't die on error
> >                               AutoCommit => 1, # commit executes
> >                               # immediately
> >                              }
> >                             )
> >   or DBI->disconnect("Cannot connect to database: $DBI::errstr\n");
> 
> There's no DBI->disconnect method. Just die().

ok

> Thanks for doing all this work Stas. Much appreciated.

Thanks :) 

This all won't be possible without you and other great folks writing and
maintaining this amaizing software... So the biggest thanks goes to you :) 

_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]   http://perl.org     http://stason.org/TULARC
http://singlesheaven.com http://perlmonth.com http://sourcegarden.org

Reply via email to