has one server activity,database's activity and have an array to get the values returned from the fetchrow_array() and then see if it is defined
my $my_table = $dbh->prepare("select * from my_table where id =
+ ?");
$my_table->execute($nm);
while(@data = $my_table->fetchrow_array){
map{print "$_\n";}@data;
}