Is this the correct way to write a PDO update statement? I based it off a tutorial I saw online but it doesn't seem to be doing anything at all when fired by AJAX (even though the AJAX request is being logged as successful in the console, no update is made to the database):
$duedate = $_POST["duedate"];
$status = $_POST["status"];
$id = $_POST["id"];
$sql = "UPDATE pm_schedule SET duedate=?, status=? WHERE id=?";
$q = $pdo->prepare($sql);
$q->execute(array($duedate,$status,$id));