in reply to Re: Database Connections
in thread Database Connections
It is best to minimize the number of times you have to make a db connection right? If I do it this way though, I only make one db connection but use it in two subroutines.test1(); test2(); sub test1 { $dbh=new MyDBLayer; $dbh->do(etc..); } sub test2 { $dbh=new MyDBLayer; $dbh->do(etc..); }
Is it wrong to do it this way?$dbh=new db connection; test1($dbh); test2($dbh); sub test1 { $dbh->do(etc..); } sub test2 { $dbh->do(etc..); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Database Connections
by Fastolfe (Vicar) on Jan 15, 2001 at 20:19 UTC | |
|
Re: Re: Re: Database Connections
by chipmunk (Parson) on Jan 15, 2001 at 20:23 UTC |