num_rows > 0) { // 输出数据 while($row = $result->fetch_assoc()) { // 获取每个字段的值 $banner = $row["banner"]; $link = $row["link"]; $banner_one = $row["banner_one"]; $link_one = $row["link_one"]; $banner_two = $row["banner_two"]; $link_two = $row["link_two"]; } } else { // echo "未找到匹配的记录"; } ?>