[SQL Question] Banned accounts

Junior Spellweaver
Joined
Jan 16, 2007
Messages
133
Reaction score
0
I'm trying to make this show who's banned but instead of showing their char names it tells me how many exp:4 lol... >.> forgive me for being a noob in SQL :/

$hostname = "localhost";
$username = "root";
$password = "pw";
$db = "rose131";

$sql = mysql_connect($hostname,$username,$password);
mysql_select_db($db);

$query = mysql_query("SELECT * FROM accounts WHERE accesslevel = '0'");
$result = mysql_num_rows($query);

echo " $result";

mysql_free_result($query);

Thanks in advice.
 
It kinda worked because i have like 10 people banned from my server and it only showed 1 person lol, is that suppost to happen? O.o
 
Back