<?php
include "../config.php";
include "classes.php";

$condX = $_REQUEST['condX'];
$conX = $_REQUEST['conX'];
$tblX = $_REQUEST['tblX'];

if($conX==1)
{    
    $condX="1=1";   
}

$data = array();

$recordCounter = new RecordCounter($conn,$condX,$tblX);

$data['Q901a'] = $recordCounter->countRecords('A_Q901a_', range(1, 14),$airport);
$data['Q902b'] = $recordCounter->countRecords('A_Q902b_', range(1, 12),$airport);

echo json_encode($data);

?>