<?php

/**
 * model\growth\GrowthBroker.php
 */

/**
 * 经纪人类
 *
 * @author bsw
 */
class GrowthBroker {
    /**
     *
     * @var TINY_ADODB 主数据库 
     */    
    private $db;
    
    /**
     *
     * @var type 从数据库
     */
    private $dbback;
    
    /**
     *
     * @var type 缓存对象
     */
    private $mc;

    /**
     *
     * @var String 关联的表名 
     */
    private $table;

    /**
     * 构造函数，初始化db memcache 等。
     * @param string $table 表名，可以使用默认值。
     */
    public function __construct($table=null) {
        $container = Container::getInstance();
        $this->db = $container->get('db');
        $this->dbback = $container->get('dbback');
        $this->mc = $container->get('mc');
        $this->table = 'broker';
    }


	/**
     * 获取经纪人总数 
     * return int
	 */
	 function getBrokerCount(){
		$sql = SqlCombinHelper::select_sql('broker',"count(*) as num", " valid_flag = 1");
		return $this->dbback->getOne($sql);
	 }
      
}

?>
