邮编查询成都市锦江区 (邮编查询成都青羊区)
成都品茶
07-21
阅读:2
评论:0
![](/gg/hf11.gif)
请输入地址! ';exit;}// 连接数据库$conn = mysqli_connect('localhost', 'root', '', 'city_postcodes');if (!$conn) {die('数据库连接失败:' . mysqli_connect_error());}// 设置字符编码mysqli_query($conn, "SET NAMES utf8");// 准备查询语句$sql = "SELECT FROM postcodes WHERE city = '成都市' AND district = '锦江区' AND address LIKE '%$address%'";// 执行查询$result = mysqli_query($conn, $sql);if (!$result) {die('查询失败:' . mysqli_error($conn));}// 判断查询结果$num_rows = mysqli_num_rows($result);if ($num_rows == 0) {echo '
没有找到匹配的邮编。
';} else {echo '';echo '';echo '';echo '';echo '';echo '';echo '';echo '';while ($row = mysqli_fetch_assoc($result)) {echo '';echo '';echo '';echo '';}echo '';echo '地址 | 邮编 |
---|---|
' . $row['address'] . ' | ' . $row['postcode'] . ' |
版权声明
本文仅代表作者观点,不代表成都桑拿立场。
本文系作者授权发表,未经许可,不得转载。