Copyright © 2025
版权所有 成都畅邮信息 xml txt html 成都民宿 知识园地 行业新闻 流量卡 成都民宿 带宽办理欢迎使用锦州住宿酒店查询系统。在这里,您可以轻松查询到锦州所有符合您要求的酒店信息。
connect_error) {die("连接失败: " . $conn->connect_error);}// 获取表单数据$check_in = $_GET["check_in"];$check_out = $_GET["check_out"];$hotel_type = $_GET["hotel_type"];$min_price = $_GET["min_price"];$max_price = $_GET["max_price"];$facilities = $_GET["facilities"];// 构建查询语句$sql = "SELECT FROM hotels WHERE";if ($check_in) {$sql .= " check_in >= '$check_in'";}if ($check_out) {$sql .= " AND check_out <= '$check_out'";}if ($hotel_type != "all") {$sql .= " AND hotel_type = '$hotel_type'";}if ($min_price) {$sql .= " AND price >= $min_price";}if ($max_price) {$sql .= " AND price <= $max_price";}if ($facilities) {$sql .= " AND (";foreach ($facilities as $facility) {$sql .= "facilities LIKE '%$facility%' OR";}$sql = substr($sql, 0, -3); // 去掉最后一个 OR$sql .= ")";}// 执行查询$result = $conn->query($sql);if ($result->num_rows > 0) {// 输出查询结果echo "";echo "";while ($row = $result->fetch_assoc()) { echo "";echo "";echo "";echo "";echo "";echo "";echo "";}echo "| 名称 | 地址 | 类型 | 价格 | 设施 |
|---|---|---|---|---|
| " . $row["name"] . " | " . $row["address"] . " | " . $row["hotel_type"] . " | " . $row["price"] . " | " . $row["facilities"] . " |
如果您对此感兴趣,可以通过以下联系方式与我们联系:
成都区销售
重庆区销售
云贵区销售
华南区销售
华北区销售
华东区销售