Re: Apache::DBI and pnotes

2006-10-02 Thread Jonathan Vanasco
On Oct 2, 2006, at 5:31 PM, Michael Peters wrote: does apache::dbi ping a connection then reconnect if the ping fails? If you call DBI->connect it does. awesome. i never knew that.

Re: Apache::DBI and pnotes

2006-10-02 Thread Michael Peters
Jonathan Vanasco wrote: > > On Oct 2, 2006, at 4:01 PM, Michael Peters wrote: > >> The main problem with this is that if you loose your db connection >> somehow, you >> wouldn't know until it bombed out on you unless you constantly check it >> everytime before you use it. > > does apache::dbi

Re: Apache::DBI and pnotes

2006-10-02 Thread Jonathan Vanasco
On Oct 2, 2006, at 4:01 PM, Michael Peters wrote: The main problem with this is that if you loose your db connection somehow, you wouldn't know until it bombed out on you unless you constantly check it everytime before you use it. does apache::dbi ping a connection then reconnect if the p

Re: Apache::DBI and pnotes

2006-10-02 Thread Michael Peters
Jonathan Vanasco wrote: > but storing pnotes is just > > handler 1 > $r->pnotes( 'database_connect'=> $database_connect ); > > handler 2 > my $database_connect = $r->pnotes('database_connect'); The main problem with this is that if you loose your db connection somehow, you wouldn'

Re: Apache::DBI and pnotes

2006-10-02 Thread Jonathan Vanasco
On Oct 2, 2006, at 1:57 PM, Vladimir S. Tikhonjuk wrote: my $database_connect = DBI->connect( 'dbi:Pg:dbname=$database;host=$host, $user, $password ) || die "Can't connect to database: ".$DBI::errstr; As I understand, I may write a handler, which would have such code, and then

Apache::DBI and pnotes

2006-10-02 Thread Vladimir S. Tikhonjuk
Hi all! I have some simple scripts, on my web server. Each of them have to do some tasks with database, so the first what I do in the handler is: my $database_connect = DBI->connect( 'dbi:Pg:dbname=$database;host=$host, $user, $password ) || die "Can't connect to database: ".$DB