title: Mysql_result() error
body: <p>I'm trying to get pagination to work on my page, but running into a error:</p>
  
  <p><code>mysql_result() expects parameter 1 to be resource, object given in</code></p>
  
  <p>I think I need to use a <code>mysqli</code> command but can't seem to figure it out.  Here is my code</p>
  
  <pre><code>$connect = mysqli_connect('localhost', 'root', 'password', 'vdb');
  $per_page = 6;
  $pages_query = mysqli_query($connect, "SELECT COUNT(id) FROM customers");
  
  $pages = ceil(mysql_result($pages_query, 0) / $per_page);
  
  $page = (isset($_GET['page'])) ? (int)$_GET['page'] : 1;
  $start = ($page - 1) * $per_page;
  $query = mysqli_query($connect, "SELECT cid, fname, lname,address, score  FROM customers");
  
  
  while ($query_row = mysqli_fetch_assoc($query)) {
      $array[] = $query_row['fname'] . '&lt;br /&gt;';
  }
  if($pages &gt;= 1)
  {
      for($x=1; $x &lt;= $pages; $x++)
      {
          echo '&lt;a href="?page='.$x.'"&gt;' .$x.'&lt;/a&gt;';
      }
  
  }
  </code></pre>
  
  <p>Thanks in Advance!</p>