#!/usr/bin/perl

use DBI;


$dbh = DBI->connect("DBI:mysql:games2000:localhost", "games2000", "games2000") || die "motherfucka!\n";

$sth = $dbh->prepare("select * from sports order by sport_name");
$sth->execute;

while( $row = $sth->fetchrow_hashref ) {

    print "$row->{sport_name} &nbsp; &nbsp; <img src='$row->{sport_icon}'><br>";
}

$sth->finish;
$dbh->disconnect;