ok
Direktori : /home2/selectio/public_html/obnovit-tracking/api/ |
Current File : /home2/selectio/public_html/obnovit-tracking/api/get-desgination-api.php |
<?php include"../config/config.php"; if($_POST['type']=="get_desgination"){ $departement_id = $_POST['departement_id']; $where=""; if($departement_id!='all' && $departement_id!=''){ $where="WHERE departement_id=$departement_id"; } $statement = $pdo->prepare("SELECT * FROM `tbl_desgination` $where"); $statement->execute(); $result = $statement->fetchAll(PDO::FETCH_ASSOC); $totalrow = $statement->rowCount(); if($result){ $response['data']=$result; $response['error']=false; $response['message']="desgination details fetched Successfuly"; }else{ $response['error']=true; $response['message']='failed'; } echo json_encode($response); } ?>