0
私は現在、配置されている現在のチケットのデータを挿入する場所に作成しようとしていますが、挿入されません。データはデータベースに挿入されません[PHP]
function insertTicketSubmission($title, $subject, $question)
{
global $database;
global $error;
$sth = $database->prepare("INSERT INTO `tickets` (`TicketId`, `PlayerId`, `Title`, `Subject`, `Question`, `Date`, `Status`) VALUES (:TicketID, :PlayerID, :Title, :Subject, :Question, GETDATE(), Pending)");
$sth->bindParam(":TicketID", generateRandomString());
$sth->bindParam(":PlayerID", $_SESSION["userId"]);
$sth->bindParam(":Title", $title);
$sth->bindParam(":Subject", $subject);
$sth->bindParam(":Question", $question);
if($sth->execute())
{
$error = sendError("success", "Your Ticket has been submitted.");
}
}
エラーはありませんが、テーブルには挿入されません。
「保留中」は文字列ですか? – chris85
'pending'!==':pending' – RiggsFolly
あなたは '保留中 'を束縛していません – RiggsFolly