Oh, I see what you want. Yeah, you can't expect two databases to be able to share a single database connection. However, you can get the results you want using something like the (untested) bit below:
$dbh1->connect("to db2 database"); $dbh2->connect("to sybase database"); $sth1=$dbh1->prepare("select apples, bananas from fruit_salad"); $sth2=$dbh2->prepare("insert snack (apples, bananas) values (?,?)"); $sth1->execute(); while (@row=$sth1->fetchrow_array()) { $sth2->execute(@row); }
This way, you get the data out of your statement handle in a nice, simple array which you feed to your *other* statement handle.
...roboticusIn reply to Re^3: Concurrent access to db2 and sybase databases
by roboticus
in thread Concurrent access to db2 and sybase databases
by mayankshah
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |