title: mysqli_error() is not working
body: <p>I have written a <code>mysql_query</code> and it is not working.</p>
  
  <p>I want to know the problem via <code>mysqli_error()</code> however it gives the following error <code>mysqli_error()</code> expects parameter 1 to be <code>mysqli</code></p>
  
  <p>my mysql code is as follows:</p>
  
  <pre><code>$connect = mysqli_connect("localhost","root", "", "tomuman");
  $query = mysqli_query($connect, "SELECT id, to FROM messages WHERE read='0'");
  </code></pre>
  
  <p>and <code>mysqli_error</code> as follows:</p>
  
  <pre><code>echo mysqli_error($query);
  </code></pre>
  
  <p>What could cause this problem?</p>