$prodCard = $pdo->prepare('SELECT * FROM models WHERE id= :id');
$prodCard->execute(array('id'=>$id));
$prodCard = $prodCard->fetch();
$prodImg = $pdo->prepare('SELECT image FROM upload_images WHERE products_id= :id');
$prodImg->execute(array('id'=>$id));
$prodImg = $prodImg->fetchAll();
$prodReviews = $pdo->prepare('SELECT * FROM table_reviews WHERE products_id= :id AND moderate_status=1');
$prodReviews->execute(array('id'=>$id));
$prodReviews = $prodReviews->fetchAll();
$pdo = null;
return array('prodCard'=>$prodCard, 'prodImg'=>$prodImg, 'prodReviews'=>$prodReviews);
select 'REVIEWS', id, products_id, name, good_reviews
from table_reviews
union
select 'IMAGES' , id, products_id, image, NULL
from upload_images