is it possible to use two sth from same dbh at the same time ?
my $dbh = DBI-connect(); my $sth1 = $dbh-prepare( $sql_a ); my $sth2 = $dbh-prepare( $sql_b ); $sth1-execute; $sth2-execute; while ( my ($id) = $sth1-fetchrow_array ) { $sth2-execute( $id ) } # is it possible ?
Re: is it possible to use two sth from same dbh at the same time ?
mostly I use mysql, DBD::mysql, also mssql, ODBC and sybase driver.
why DBD::mysql need database name for connecttion ?
in the pod: Class Methods connect use DBI; $dsn = DBI:mysql:$database; $dsn = DBI:mysql:database=$database;host=$hostname; $dsn = DBI:mysql:database=$database;host=$hostname;port=$port;