I forgot to copy paste that part in...
Code:
$sth = $dbh->prepare("SELECT name FROM items WHERE id = $looted_id");
$sth->execute();
my $row = $sth->fetchrow_array();
$dbh->disconnect();
This would only just show the name of the item someone looted ... like I said before this was just for testing.. DBI. This is definitely not something you want to do for looting.