title: php mysqli_insert_id() expects parameter 1 to be mysqli
body: <p>This is my code</p>
  
  <pre><code>$conn = mysql_connect($serverName, $username, $password)
          or die("Unable to connect to MySQL");
      $selected = mysql_select_db($databaseName,$conn)
          or die("Could not find the database");
      $result = mysql_query("INSERT INTO `user` () VALUES ()");
      return mysqli_insert_id($result)
  </code></pre>
  
  <p>This is the exception</p>
  
  <pre><code>Warning: mysqli_insert_id() expects parameter 1 to be mysqli, boolean given in C:\xampp2\htdocs\XXX\controllers\User.php on line 24
  </code></pre>
  
  <p>and the line 24 is <code>return mysqli_insert_id($result)</code></p>