我正在尝试从 mysql 数据库的特定表中连续打印所有项目。
这是我得到的输出(这不是我想要的):
**mysqli_result Object ( [current_field] => 0 [field_count] => 3 [lengths] => [num_rows] => 28 [type] => 0 ) Array ( )**
这是我的做法:
<?php
$connect = mysqli_connect("localhost", "root", "root");
mysqli_select_db($connect, "TrackTool");
$fetch1 = mysqli_query($connect, "SELECT * FROM SalesForceActions");
// set array
$array = array();
// look through query
while($row = mysql_query($fetch1)){
// add each row returned into an array
$array[] = $row;
}
print_r($fetch1);
print_r($array);
mysqli_close($connect);
?>
我究竟做错了什么?