num_rows > 0) { // 输出数据 while ($row = $result->fetch_assoc()) { // 获取每个字段的值 $zhutu = $row["zhutu"]; $goods = $row["name"]; $link = $row["link"]; $jieshao = $row['jieshao']; $price = $row['price']; $proxy_price = $row['proxy_price']; $state = $row["state"]; $haokaid = $row['haokaid']; $apiType = $row['api_type']; $se_num = $row['se_num']; // 查询 goodsta 表 $sql_goodsta = "SELECT * FROM goodsta WHERE spid = $id AND puid = $proxyid"; $result_goodsta = mysqli_query($con, $sql_goodsta); if ($result_goodsta->num_rows > 0) { // 输出数据 while ($row_goodsta = $result_goodsta->fetch_assoc()) { // 获取状态 $status = $row_goodsta["status"]; } } // 判断状态 if ($status == 1 || $state == 1) { // 商品已下架,显示警告并在5秒后跳转到index.php页面 echo ""; exit; // 终止代码执行 } // 查询与传递的proxy_id相匹配的数据 $sql_proxy = "SELECT * FROM proxy WHERE proxy_id =" . $proxyid; $result_proxy = mysqli_query($con, $sql_proxy); if ($result_proxy->num_rows > 0) { // 输出数据 while ($row_proxy = $result_proxy->fetch_assoc()) { // 获取group_id的值 $group_id_proxy = $row_proxy["group_id"]; // 查询与group_id_proxy相匹配的数据 $sql_group = "SELECT * FROM proxy_group WHERE group_id =" . $group_id_proxy; $result_group = mysqli_query($con, $sql_group); if ($result_group->num_rows > 0) { // 输出数据 while ($row_group = $result_group->fetch_assoc()) { // 获取group_portion的值 $group_portion = $row_group["group_portion"]; $portion = $group_portion; } } else { // 未找到匹配的记录 // echo "未找到匹配的记录"; } } } else { // 未找到匹配的记录 // echo "未找到匹配的记录"; } // 使用
标签渲染信息 // echo "
主图: ".$zhutu."
名称: ".$name."
链接: ".$link."