$pageMin = (($page * 10)-10);
$reponse = $bdd->prepare('SELECT pseudo, message FROM minichat ORDER BY id DESC LIMIT ?, 10');
$reponse->execute(array($pageMin));
占位符似乎不适用于 LIMIT ......
当我与 pageMin 连接时,它可以工作,例如:
$reponse = $bdd->query('SELECT pseudo, message FROM minichat ORDER BY id DESC LIMIT' . $pageMin . ', 10');
甚至
$reponse = $bdd->prepare('SELECT pseudo, message FROM minichat ORDER BY id DESC LIMIT' . $pageMin . ', 10');
$reponse->execute(array());
使用占位符,它没有返回任何结果,为什么?
感谢您的帮助。