<?php 
require_once '../config/db.php';
require_once '../config/database.class.php';
require_once '../config/functions.php';
$d = new database($db_config);

if(isset($_POST)){
    $post = $_POST;
    $id =  $post['id'];
    $query = "SELECT * FROM productimages WHERE id=$id LIMIT 1";
   // $query = "SELECT * SELECT category.subcategory as category, product.,subcategory.subcategory as subcategory, product.* from subategory JOIN product on product.catid = subcategory.catid  WHERE id=$id LIMIT 1";
    $executeQuery = $d->selectQueryInArray($query);
    echo json_encode($executeQuery);
}

?>
