Je kunt dit proberen:
//Establish connection using mysqli api
$conn = mysqli_connect('hostname', 'username', 'password', 'database_name');
$sql = "SELECT SQL_CALC_FOUND_ROWS *, post.id as pid, bla bla FROM account ORDER BY pid ASC". $eb["array"]['querylimit'];
$sql2 = "SELECT FOUND_ROWS()";
$result1 = $conn->query($sql);
$result2 = $conn->query($sql2);
$TotalRcount = $result2->fetch_row();
// Performing record count [current]
// $RecordCount = $result->num_rows();
while($row = $result->fetch_array(MYSQLI_BOTH)){
// read columns
}
In een while-lus heb ik de constante MYSQLI_BOTH gebruikt, maar je kunt deze wijzigen in MYSQLI_NUM of MYSQLI_ASSOC, wat je maar wilt.