<?php
    include_once('../common/base.php');
    include_once('../common/func.php');
    $wcids=isset($_POST['wcids'])?$_POST['wcids']:'';
    $sql="select * from Equipment where CenterId in ({$wcids}) and valid=1 ";
    $stmt=myQuery($conn, $sql);
    $equs=[];
    while($row = sqlsrv_fetch_array($stmt, SQLSRV_FETCH_ASSOC)){ 
        $equs[]=$row;
    }
    sqlsrv_free_stmt($stmt);


    echo json_encode(array('code'=>1,'equs'=>$equs));