警告:mysqli_stmt :: close()[mysqli-stmt.close]:无效的对象或资源mysqli_stmt ...为什么? [英] Warning: mysqli_stmt::close() [mysqli-stmt.close]: invalid object or resource mysqli_stmt... why?
本文介绍了警告:mysqli_stmt :: close()[mysqli-stmt.close]:无效的对象或资源mysqli_stmt ...为什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
出于学习目的,为什么php会哭泣以下代码并给出以下警告:
for learning purposes, why does php cries about the following code and gives the following warning:
Warning: mysqli_stmt::close() [mysqli-stmt.close]: invalid object or resource mysqli_stmt in C:\public_html\admin\disctrack.php on line 14
12 $conn = connect('w'); // connect to a database in write mode
13 $stmt = $conn->stmt_init(); // initialize a prepared statement
14 $stmt->close(); // close statement
推荐答案
任何对mysqli_stmt函数的后续调用都将失败,直到调用mysqli_stmt_prepare()为止.
Any subsequent calls to any mysqli_stmt function will fail until mysqli_stmt_prepare() was called.
这篇关于警告:mysqli_stmt :: close()[mysqli-stmt.close]:无效的对象或资源mysqli_stmt ...为什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文