<?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['Q1001a'] = $recordCounter->countRecords('A_Q1001a_', range(1, 16),$airport);
$data['Q1002b'] = $recordCounter->countRecords('A_Q1002b_', range(1, 14),$airport);

echo json_encode($data);

?>