I'm trying to get pagination to work on my page, but running into a error:

`mysql_result() expects parameter 1 to be resource, object given in`

I think I need to use a `mysqli` command but can't seem to figure it out. Here is my 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'] . '<br />';
}
if($pages >= 1)
{
    for($x=1; $x <= $pages; $x++)
    {
        echo '<a href="?page='.$x.'">' .$x.'</a>';
    }

}

```

Thanks in Advance!