query("UPDATE renderqueue SET renderStatus = 4 WHERE renderStatus = 1 LIMIT 1"); // moved this to upload echo "success"; break; case 2: //error $query = $pdo->prepare("UPDATE renderqueue SET renderStatus = 3, additionalInfo = :response, timestampCompleted = UNIX_TIMESTAMP() WHERE renderStatus = 1 LIMIT 1"); $query->bindParam(':response', $response, PDO::PARAM_STR); $query->execute(); echo "success"; break; default: die("invalid type"); } ?>