@@ 674-685 (lines=12) @@ | ||
671 | $sql .= "$where order BY h.hotel_rank ,h.hotel_id DESC "; |
|
672 | $query = $this->db->query($sql, $limit, $start); |
|
673 | $cityList = &self::getCityList(); |
|
674 | while ($row = $this->db->fetchArray($query)) { |
|
675 | $city_ids = explode(',', $row['hotel_city_id']); |
|
676 | foreach ($city_ids as $id) { |
|
677 | $city_name[] = $cityList[$id]; |
|
678 | } |
|
679 | $hotel_ids[] = $row['hotel_id']; |
|
680 | $row['city_name'] = implode('、', $city_name); |
|
681 | $row['hotel_open_time'] = date('Y-m-d H:i:s', $row['hotel_open_time']); |
|
682 | $row['hotel_add_time'] = date('Y-m-d H:i:s', $row['hotel_add_time']); |
|
683 | $nrows[] = $row; |
|
684 | unset($row, $city_name); |
|
685 | } |
|
686 | $this->hotel_ids = &$hotel_ids; |
|
687 | ||
688 | //echo '<pre>';print_r($nrows); |
@@ 106-118 (lines=13) @@ | ||
103 | $result = $this->db->query($sql); |
|
104 | $this->hotel_ids = &$hotel_ids; |
|
105 | $cityList = &$hotel_handler->getCityList(); |
|
106 | while ($row = $this->db->fetchArray($result)) { |
|
107 | $hotel_ids[] = $row['hotel_id']; |
|
108 | $city_ids = explode(',', $row['hotel_city_id']); |
|
109 | foreach ($city_ids as $id) { |
|
110 | $city_name[] = $cityList[$id]; |
|
111 | } |
|
112 | $row['city_name'] = implode('、', $city_name); |
|
113 | $row['hotel_image'] = unserialize($row['hotel_image']); |
|
114 | $row['hotel_google'] = unserialize(unserialize($row['hotel_google'])); |
|
115 | //var_dump($row['hotel_google']); |
|
116 | $rows[] = $row; |
|
117 | unset($city_name); |
|
118 | } |
|
119 | ||
120 | //$rows = $this->GetRows($sql,'hotel_id'); |
|
121 | return $rows; |