<?php
/**
 * Description of GrowthBidHotSearchRecordOn
 *
 * @author user
 */
class GrowthBidHouseRecordOn extends GrowthBidHouseRecord {
    public function __construct($table = 'growth_bid_house_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;
    }
}
