PHP代码中的以下SQL查询不起作用,有人可以帮助我吗?
$reponse = $bdd->query("SELECT * FROM tasks WHERE destinataire = ':destinataire' ORDER BY maturity ASC");
$reponse->execute(array(
':destinataire'=>$_SESSION['login']
));
正确的查询如下:
$reponse = $bdd->prepare("SELECT * FROM tasks WHERE destinataire = :destinataire ORDER BY maturity ASC");