我在删除我的基地列时遇到问题。
当我执行 php 脚本时,没有任何反应。如果有人可以帮助我。
我的数据库锦标赛;
/*In the table Tournament */
INSERT INTO Tournament (nomTournament, nbPlayersMax, nbPlayersAct, dateStart, kindTournament_id, avancement, code, membre_mail)
VALUES ('MyTournamentFootball', '8', '0', NOW(), '2', '0', '6148', '[email protected] /cdn-cgi/l/email-protection');
INSERT INTO Tournament (nomTournament, nbPlayersMax, nbPlayersAct, dateStart, kindTournament_id, Avancement, code, membre_mail)
VALUES ('MyTournamentFootball2', '4', '0', NOW(), '1', '0', '5691', '[email protected] /cdn-cgi/l/email-protection');
现在我要删除的 php 代码:
<?php
session_start();
include ('config.php');
$nomTournament = 'MyTournamentFootball2';
$code = '5691';
// query the application data
$query = $handler->prepare("Delete from Tournament WHERE nomTournament = :nomTournament AND code = :code ;");
//bind the parameters
$query->bindParam(':nomTournament', $nomTournament, PDO::PARAM_STR);
$query->bindParam(':code', $code, PDO::PARAM_INT);
//execute the prepared statement
$query->execute();
?>
我知道代码很简单,但它不起作用,所以如果你能帮助我。
Thanks
Michaël