mektroid wrote in php

Listens: FF3D Festival 2005 - Ferry Corsten 13-08

Ressource id #8

$query = "SELECT * FROM users WHERE username = '$username' LIMIT 1;";
$result = mysql_query($query);
if ($result) { 
 # deny this user // already in
}
else { 
 # add new user
}

$result ouputs "Ressource id #8." I tried different set of variables in case it could be the problem but everything echo with the correct values. What I'm looking for is: check into the database, if there a equal username already registered. Both tries [with an existant and an unexistant username], it returns the same error. I've looked around either google.com and php.net, it turned on hopeless.

Can you help me out?