So i have this php project and the problem is this code;
try{
$pdo->beginTransaction();
$sql = "UPDATE lib_storeroom SET medicine_id=:med_id WHERE medicine_count = :medicine_count_prev + :medicine_qty";
$s = $pdo -> prepare($sql);
$s -> bindValue(':med_id', $_SESSION['med_id_pull']);
$s -> bindValue(':medicine_count_prev', $_SESSION['med_qty']);
$s -> bindValue(':medicine_qty', $_SESSION['replenish_qnty']);
$s -> execute();
$pdo->commit();
}
..and this doesn't update the value. Pls help