I'm trying to implement a pagination system into my website and can't get past this one stubborn error. I'm not exactly sure if you can use FOUND_ROWS() in mysqli as opposed to PDO but that's what I came here for.
I have the latest version of PHP and everything worked up to this point in the pagination.
$stmt = $conn->prepare('SELECT count(*) FROM owned_assets WHERE uid=? AND type=? LIMIT '.$start.', '.$rLim);
$stmt->bind_param('ii', $uid, $assetType);
$stmt->execute();
$total = $conn->query('SELECT FOUND_ROWS() as total')->mysqli_fetch_array()['total'];
What's supposed to happen (so far) is mysql will count the rows found within the matching query and I can work further on from there.
This is my current error:
Fatal error: Uncaught Error: Call to a member function mysqli_fetch_array() on bool