Warning: mysqli_query() expects at least 2 parameters, 1 given in D:\phpstudy_pro\WWW\allusers.php on line 31Warning: mysqli_num_rows() expects parameter 150Warning:msqli_num_rows() expect \allusers.php on line 33
下面是程式碼
//查詢資料表中的所有資料
$result=mysqli_query("SELECT * FROM users BY id DESC ");
//取得資料表的資料條數
$dataCount=mysqli_num_rows($result);
//echo $dataCount;
//列印輸出所有資料
#
mysqli_query()接收兩個參數,第一個參數是MySQL 連線