Date: 08/16/05 (PHP Community) Keywords: php, mysql, database, sql, google $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? Source: http://www.livejournal.com/community/php/336854.html
|