is it possible to use two sth from same dbh at the same time ?

2011-07-12 Thread ZhangJun
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 ?

2011-07-12 Thread ZhangJun
mostly I use mysql, DBD::mysql, also mssql, ODBC and sybase driver.

why DBD::mysql need database name for connecttion ?

2011-10-14 Thread ZhangJun
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;