如果我正确阅读了 PHP 文档,我想使用 mysqli_stmt_init 创建一个适合 stmt 操作的变量,对吗?我以为我做得对,但它似乎不能正常工作。当我按照文档说的那样做时,它给了我一个错误:
警告:mysqli_stmt_bind_param() [function.mysqli-stmt-bind-param]:无效对象或资源 mysqli_stm"
$get_posts = mysqli_stmt_init($db);
mysqli_stmt_prepare($get_posts, 'select * from Chatposts where Chatid = ? and and CPid > ? and Deleted = ? order by CPid desc limit ?');
mysqli_stmt_bind_param($get_posts, 'iiii', $chatroomid, $lastpost, $deleted, $limit);
mysqli_stmt_execute($get_posts);
mysqli_stmt_bind_result($get_posts, $newposts);
mysqli_stmt_fetch($get_posts);
mysqli_stmt_close($get_posts);
你能看到我在这里做错了吗?