concat pdo not dieing, but still not updating the database
my code is as follows
SQL = 'UPDATE cb_contact_tickets SET ticket_status = :status' .
($_POST['status']=="declined"?', declined=CONCAT(declined, :captain_id),
captain_id=NULL':'') .
' WHERE captain_id = :captain_id AND user_id = :user_id';
$stmt = $dbh->prepare($SQL);
$stmt->bindParam(':user_id', $_POST['user_id']);
$stmt->bindParam(':status', $_POST['status']);
$stmt->bindParam(':captain_id', $capatinID);
if (!$stmt->execute()) {
die(print_r($stmt->errorInfo()));
}
I checked the responses and i consistently get success ( a json encoded
response at the end) but my database doesnt change. The code doesnt die,
and im pulling hair out trying to figure out why. Please help.
No comments:
Post a Comment