问题1:
mysql_query() expects parameter 2 to be resource, object given in D:\phpStudy\PHPTutorial\WWW\20200203fruit\index.php on line 44
问题2:
mysql_fetch_array() expects parameter 1 to be resource, null given in D:\phpStudy\PHPTutorial\WWW\20200203fruit\index.php on line 45
情境再现:
原因:mysql_query和mysql_fetch_array()是过去式的。需要最新款mysqli_query和mysqli_fetch_array()