in reply to fetchrow_array DBI

Your connect string in line 8 looks fishy to me. Try (with suitable values of 'data' and 'server'),

my $dbh = DBI->connect("DBI:mysql:database=data;host=server","uname"," +pass") or die( "Could not make connection to database: $DBI::errstr" );
and see if that helps.

Update: Mr. Muskrat++ and dws++ spotted a larger problem. I'll just add that fetchrow_array is a method of statement handles, not database handles. I'm informed that your connection string is an ok shorthand for what I suggested.

After Compline,
Zaxo