function userexists($username){
$query=$mysqli->query("SELECT username FROM accounts WHERE username='$username' AND exists=1");
return mysqli_num_rows($query);
}
This function should be returning 1 or 0 but I can not figure out why the query is not being interpreted. What's wrong?
Edit: the error being returned by php is that $query is a boolean being fed into mysqli_num_rows, not an object.