title: syntax error, unexpected 'mysqli_num_rows'
body: <p>This is my code:</p>
  
  <pre><code>$u_check = mysql_query("SELECT username FROM users WHERE usnername='$un' '");
  $check = mysqli_num_rows ( $u_check );
  </code></pre>
  
  <p>I get the following error: </p>
  
  <blockquote>
    <p>Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result,
    boolean given in C:\xampp\htdocs\Socially\index.php on line 27</p>
  </blockquote>
  
  <p>I can't fix this, i am using a tutorial to help me do something, and this is what he typed. I really want to fix it so i can continue what I want to do; I'm doing the database because I am making a login and register form. Please help.  When I type <code>$check = mysqli_num_rows ( $u_check );</code> into the sql tab in phpmyadmin, i get this message: </p>
  
  <p>Static analysis:</p>
  
  <blockquote>
    <p>3 errors were found during analysis.<br>
    Unexpected character. (near "$" at position 0)<br>
    Unexpected character. (near "$" at position 25)<br>
    Unexpected beginning of statement. (near "$" at position 0)  </p>
    
    <p>SQL query:<br>
    $check = mysqli_num_rows($u_check)</p>
    
    <p>MySQL said: Documentation</p>
    
    <p>#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use</p>
    
    <p>near '$check = mysqli_num_rows($u_check)' at line 1</p>
  </blockquote>