<?php
try{
    $INC_DIR = $_SERVER['DOCUMENT_ROOT']."/v1/app/";
    include $INC_DIR."src/common.php";
    
    sqlHandler::getconnection();       
    echo json_encode(['connection'=>'success']);
    /* sqlhandler::addCustomerCount(['brand'=>$configs->brand,'orderId'=>'9999']);
    sqlhandler::addCustomerCount(['brand'=>$configs->brand,'orderId'=>'9888']);
    sqlhandler::addCustomerCount(['brand'=>$configs->brand,'orderId'=>'9777']);
    sqlhandler::addCustomerCount(['brand'=>$configs->brand,'orderId'=>'9666']);
    sqlhandler::addCustomerCount(['brand'=>$configs->brand,'orderId'=>'8999']);
    sqlhandler::addCustomerCount(['brand'=>$configs->brand,'orderId'=>'8888']);
    sqlhandler::addCustomerCount(['brand'=>$configs->brand,'orderId'=>'8777']);
    sqlhandler::addCustomerCount(['brand'=>$configs->brand,'orderId'=>'8666']); */
    //echo json_encode(['addCount'=>'success']);
    $count=sqlhandler::getCustomerCount($configs->brand);
    echo json_encode(['Count'=>$count]);
    /* $count=sqlhandler::clearCustomerCount($configs->brand);
    echo json_encode(['Count'=>$count]); */
    
}catch(Exception $e){
    echo json_encode(['test'=>'failed','message'=>$e->getMessage()]);
}
?>