I'm trying to update mulitple records at a time with pdo. When i execute the script no error shows up, but the records in the database not get updated
require_once('../connect.php');
$data= json_decode(file_get_contents("php://input"));
$collective_answer=($data->answers);
$sme_id=($data->sme_id);
foreach ((array) $collective_answer as $t) {
$answer= $t ->answer;
$quest_id= $t ->quest_id;
$sme_id= $t ->sme_id;
$tdate= $t ->tdate;
$stmt = $conn->prepare("UPDATE sme
SET sme_answer=:sme_answer,
date_answer_sme=:date_answer_sme
WHERE question_id=:question_id");
$stmt->execute(array("sme_answer" => $answer,
"date_answer_sme" => $tdate,
"question_id" => $quest_id));
}