<?php 
include 'conn.php';
$data = [];
 
 
$desc = "Select inspection_pictures.img,inspection_pictures.stock ,
 exterior_auction_grade.grade as ext_grade, 
 interior_auction_grade.grade as interior_grade 
 FROM inspection_pictures
  INNER JOIN exterior_auction_grade ON 
  exterior_auction_grade.stock_id = inspection_pictures.stock 
  INNER JOIN interior_auction_grade ON interior_auction_grade.stock_id = inspection_pictures.stock";
$descRes = $mysqli->query($desc);
while($rowDesc = mysqli_fetch_array($descRes)){

 $data[] =  $rowDesc;

}
 if(count($data)>0){
    $response['status'] = true;
    $response['response'] = "Data Exist";  
    $response['data'] = $data;  
    die(json_encode($response));
 }else{
    $response['status'] = false;
    $response['response'] = "No Data Exist";  
    die(json_encode($response));    
 }

 


?>