perlquestion
anjaana78
i have to execute multiple queries one afer the other. problem i am facing is if i am getting an error in one query my program is not executing after that query its getting killed. the code which i am using is as follows:
<code>
while( $row = $select_handle->fetchrow_hashref)#getting row from some other query
{
$handle = $syb_handle->prepare($query) or die "Unable to prepare satement";
$handle->execute or die "Unable to execute query";
$allrows = $handle->fetchall_arrayref();
my($i, $j);
for $i ( 0 .. $#{$allrows} ) {
for $j ( 0 .. $#{$allrows->[$i]} ) {
print $allrows->[$i][$j];
}#ending $j
print "\n";
}#ending the $i
}#ending while
</code>
i want that all the rows be executed and even if some of the queries get errors.
thank you.
- faaiz