[Perl] ¸òMySQL·¾³q ¤À¨É: use DBI; $dbh = DBI->connect('dbi:mysql:database=DM;host=140.113.55.66','5566','7788'); $sql = "select count(*) from `Games` Where `GameID`='55667788'"; $sth = $dbh->prepare($sql); $sth->execute || die "Could not execute SQL statement ... maybe invalid? \n\n $sql \n"; #output database results #while (@row=$sth->fetchrow_array){ print "@row\n" } @row=$sth->fetchrow_array; print "@row[1]\n";