これを試すことができます:
//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
}
whileループでは、MYSQLI_BOTH定数を使用しましたが、必要に応じてMYSQLI_NUMまたはMYSQLI_ASSOCに変更できます。