开发者

Warning: mysqli_stmt::close() [mysqli-stmt.close]: invalid object or resource mysqli_stmt... why?

开发者 https://www.devze.com 2023-04-02 12:17 出处:网络
for learning purposes, why does php cries about the following code and gi开发者_运维技巧ves the following warning:

for learning purposes, why does php cries about the following code and gi开发者_运维技巧ves 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


From the mysqli::stmt_init documentation:

Any subsequent calls to any mysqli_stmt function will fail until mysqli_stmt_prepare() was called.

0

精彩评论

暂无评论...
验证码 换一张
取 消