in reply to Multiple DB Queries using DBI
Update: Apparently, this isn't a problem for any popular database.
A related note...
Some database (MySQL) allow you to have mutliple $sth open for given $dbh:
$sth1 = $dbh->prepare($sql_statment_1); $sth1->execute(); ... $sth2 = $dbh->prepare($sql_statment_2); $sth2->execute(); ... $sth2->finish(); ... $sth1->finish();
Some don't. (MS SQL? Oracle?). In other words, it's important to know whether a given $dbh is currently associated with a $sth if you want to be portable. The easiest way to do that is to use a new $dbh for each $sth.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Multiple DB Queries using DBI
by dragonchild (Archbishop) on Nov 18, 2004 at 19:17 UTC | |
by ikegami (Patriarch) on Nov 18, 2004 at 19:35 UTC | |
by dragonchild (Archbishop) on Nov 18, 2004 at 19:40 UTC | |
by runrig (Abbot) on Nov 18, 2004 at 21:21 UTC | |
by mpeppler (Vicar) on Nov 19, 2004 at 07:56 UTC | |
by simonm (Vicar) on Nov 18, 2004 at 21:29 UTC | |
|
Re^2: Multiple DB Queries using DBI
by CountZero (Bishop) on Nov 18, 2004 at 19:49 UTC |