本帖最后由 jdalove 于 2011-07-05 10:38:16 编辑

解决方案 »

  1.   

    没有 hotel_common::get_hotel_sowntown 的代码,也没有功能说明,很难给出有益的建议
      

  2.   

    这是get_hotel_sowntown    static public function get_hotel_sowntown($sowntownids=''){
         $sowntownids = trim($sowntownids,',');
         if (empty($sowntownids)) {
         return false;
         }
    $Cache_Lite = MemoryCache::getInstance();
    $Cache_key = md5('get_hotel_sowntown_'.$sowntownids);
    if(!$return = $Cache_Lite->get($Cache_key)){
         $return = array();
         $db         = DB_MySQLi::getInstance(1);
         $sql = 'select sowntown_id,sowntown_name,sowntown_eng_name from city_sowntown where sowntown_id in ('.$sowntownids.')';
         $dbre = $db->query($sql);
         while ($row = $db->fetchRow_ASSOCS()) {
             //$return[$row['sowntown_id']]=$row['sowntown_name'];
             $return[$row['sowntown_id']]=$row;
         }
         $Cache_Lite->set($Cache_key,$return,hotel_config_const::$cache_expire['1h']);
    }
         return $return;
        }