<?php
if (!defined('BASEPATH'))
    exit('No direct script access allowed');
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of house_tag
 *
 * @author Administrator
 */
class price_remind_model extends MY_Model {
  

    /**
     * 表名
     * @var type 表名
     */
    private $table;

    public function __construct() {
        parent::__construct(1,1,1);
        $this->table = 'price_remind';
    }
    
    /**
     * 根据房源id，等需要通知房源变动的记录
     * @param type $houseid
     * @param type $tbl 
     * @return array
     */
    public function findRecordByHouseid($houseid,$tbl='sell') 
	{	
		$record_info = array();
		if($houseid > 0 )
		{			
			$this->dbback->where("houseid = $houseid AND type = '".$tbl."'");
			$record_info = $this->dbback->get($this->table)->result_array();
		}

        return $record_info;
    }

	
	public function insertdata($pr_id,$pr_uid,$pr_content)
    {     
		
        $insert_data = array();      
        $insert_data['pr_id']	= $pr_id;
        $insert_data['pr_uid']			= $pr_uid;
        $insert_data['pr_content']		= $pr_content;
        $insert_data['status']				= 0;	
        $this->db->insert("price_remind_record",$insert_data);	
        
        return $this->db->insert_id();
    }

   
    

}
?>