garancia/modules/productcomments/ajax.php
2016-10-10 15:24:25 +02:00

15 lines
327 B
PHP

<?php
if ($_POST['id']) {
require_once('../../config/config.inc.php');
$comment_id = $_POST['id'];
$sql = 'SELECT pc.*
FROM ps_product_comment pc
WHERE pc.`id_product_comment` = '.(int)$comment_id;
$result = DB::getInstance()->getRow($sql);
header('Content-type: application/json');
echo json_encode($result);
}