public function getCommAvgPriceDao($commId = 0, $month = 0) { try { if (!$month) { $month = date("Ym"); } $orm = new ORM_DwStatsORM("price_trend_comm_monthly"); $orm->COMM_ID = $commId; $orm->PERIOD = $month; return $orm->getRow(); } catch (Exception $e) { return 0; } }
static function getAreaBlockTotalPrice($p_intCityId, $p_intPeriodBegin, $p_intPeriodEnd, $p_strAreaCode, $p_intHouseModel) { apf_require_class("ORM_DwStatsORM"); switch ($p_intCityId) { case 11: $table_suffix = "_sh"; break; case 14: $table_suffix = "_bj"; break; default: $table_suffix = "_other"; } $table_name = "dw_ajk_areacode_totalprice_monthly" . $table_suffix; $objORM = new ORM_DwStatsORM($table_name); $sqlStr = "areacode=? and month_id>=? and month_id<=? and room_num=? order by month_id asc"; $params = array($p_strAreaCode, $p_intPeriodBegin, $p_intPeriodEnd, $p_intHouseModel); return $objORM->getList($sqlStr, $params); }