public function doesUserExist($u) {
$this->dbConnect();
mysql_select_db($this->database);
$sUser = mysql_real_escape_string($u);
$query = \"SEL
You have not actually executed your query:
$query = "SELECT username FROM $this->table WHERE username='$sUser'";
$doesFieldExist = false;
// Execute the query with mysql_query()
$result = mysql_query($query);
// $result is a result resource that can be passed
// to mysql_num_rows() unless the query failed and $result is FALSE
if ($result && mysql_num_rows($result) > 0) {
$doesFieldExist = true;
}