delete from user where sno = 1 Fatal error: Uncaught Error: Call to undefined function mysql_query() in D:\apache3\apache3\Apache24\htdocs\baoxian\reduce_user.php:8 Stack trace: #0 {main} thrown in D:\apache3\apache3\Apache24\htdocs\baoxian\reduce_user.php on line 8
时间: 2023-06-02 15:05:41 浏览: 149
这是一个 PHP 致命错误,意味着在执行删除命令时发生了问题。出现错误的代码是在 reduce_user.php 文件的第 8 行,因为调用了一个未定义的函数 mysql_query()。可能是因为该函数已被弃用或者未正确加载所致。
相关问题
delete from product where sno = 1 Warning: Undefined variable $cno in D:\apache3\apache3\Apache24\htdocs\baoxian\reduce_product.php on line 8 Fatal error: Uncaught TypeError: mysqli_query(): Argument #1 ($mysql) must be of type mysqli, null given in D:\apache3\apache3\Apache24\htdocs\baoxian\reduce_product.php:8 Stack trace: #0 D:\apache3\apache3\Apache24\htdocs\baoxian\reduce_product.php(8): mysqli_query(NULL, 'delete from pro...') #1 {main} thrown in D:\apache3\apache3\Apache24\htdocs\baoxian\reduce_product.php on line 8
mysqli_query() 不能为空,必须指定一个有效的 mysqli 连接信息。在 D:\apache3\apache3\Apache24\htdocs\baoxian\reduce_product.php 的第8行发生了未定义变量 $cno 的警告。
delete from `order` where sno = 2 Warning: Undefined variable $cno in D:\apache3\apache3\Apache24\htdocs\baoxian\reduce_order.php on line 8 Fatal error: Uncaught TypeError: mysqli_query(): Argument #1 ($mysql) must be of type mysqli, null given in D:\apache3\apache3\Apache24\htdocs\baoxian\reduce_order.php:8 Stack trace: #0 D:\apache3\apache3\Apache24\htdocs\baoxian\reduce_order.php(8): mysqli_query(NULL, 'delete from `or...') #1 {main} thrown in D:\apache3\apache3\Apache24\htdocs\baoxian\reduce_order.php on line 8
这是一个PHP代码中的错误信息,大致意思是:
在执行SQL语句时,出现了一些错误。具体来说,数据库中的“order”表中的“sno”为2的记录将被删除。但是在代码的第8行,变量“$cno”未被定义,导致程序出现错误。最终出现了“致命错误”,可能是因为mysqli_query函数的参数不正确导致的。
阅读全文