I am having problems getting the output from a show tables command with a perl
script that I am using.
use DBI;
open (STDERR, ">>errorfromtestline")|| die "couldn't open standard error";
$han=con_db();
print "connected to DB\n";
$sql="show columns from 113results";
$send=$han->prepare($sql);
$send->execute;
$rows=$send->rows;
print "$rows\n";
my @names;
$i=1;
while ($i <= $rows){
$names[$i][]=$send->fetchrow_array;
print "$names[$i][]";
$i++;
}
$out="$names[1]\t";
$j=2;
while($j<=$rows){
$out.="$names[$j]\t";
$j++;
}
print "$out\n";
When I put
"select * from 113results" as the query, I get the output I am expecting. But
when I leave it as "show columns from 113results, the row command gives the
correct number, but the script doesn't seem to return any of the output. AM I
doing something wrong??
thanks
Ivan