<?php
/**
 * Description of GrowthBidHotSearchRecordOn
 *
 * @author user
 */
class GrowthBidRentRecordOn extends GrowthBidRentRecord {
    public function __construct($table = 'growth_bid_rent_record_on') {
        parent::__construct($table);
    }

    public function getBidHouseByBrokerId($brokerId, $periodsId) {
        $sql = SqlCombinHelper::select_sql($this->table, 'house_id, type',  
                "broker_id = {$brokerId} and bid_periods_id = $periodsId");
        $bidFinishHouseOn = $this->mc->get($sql);
        if ($bidFinishHouseOn === false) {
            $bidFinishHouseOn = $this->dbback->getAll($sql);
            $this->mc->set($sql, $bidFinishHouseOn, 3600);
        }
        return $bidFinishHouseOn;
    }
}
