public function doesUserExist($u) {
$this->dbConnect();
mysql_select_db($this->database);
$sUser = mysql_real_escape_string($u);
$query = \"SEL
Actually you didn't executed query.
public function doesUserExist($u) {
$this->dbConnect();
mysql_select_db($this->database);
$sUser = mysql_real_escape_string($u);
$query = "SELECT username FROM $this->table WHERE username='$sUser'";
$query = mysql_query($query);
$doesFieldExist = false;
if (mysql_num_rows($query) > 0) {
$doesFieldExist = true;
}
$this->dbDisconnect();
return $doesFieldExist;
}