Fix DB query

This commit is contained in:
patrick 2025-03-13 16:33:16 +00:00
parent ccbdcb5ae4
commit 64d71a91e7

View File

@ -132,7 +132,6 @@ show_pdo_errors_if_any($pdo);
$stmt = $pdo->prepare("DELETE FROM TC_ProjectForms WHERE ProjectID=? AND FormID=? AND `year`=?"); $stmt = $pdo->prepare("DELETE FROM TC_ProjectForms WHERE ProjectID=? AND FormID=? AND `year`=?");
$stmt->execute([$r->id, $k, $CURRENT_FAIRYEAR]); $stmt->execute([$r->id, $k, $CURRENT_FAIRYEAR]);
$stmt = $pdo->prepare("INSERT INTO TC_ProjectForms (`FormID`,`ProjectID`,`uploaded`,`filename`,`pages`,`dt`,`year`) VALUES ( $stmt = $pdo->prepare("INSERT INTO TC_ProjectForms (`FormID`,`ProjectID`,`uploaded`,`filename`,`pages`,`dt`,`year`) VALUES (
$stmt->execute();
'$k', '$k',
'$r->id', '$r->id',
'1', '1',
@ -141,6 +140,7 @@ show_pdo_errors_if_any($pdo);
NOW(), NOW(),
'$CURRENT_FAIRYEAR' '$CURRENT_FAIRYEAR'
)"); )");
$stmt->execute();
} }
else else