<?php 
class Brand_mod  extends HC_Controller
{
	public function __construct()
	{
		parent::__construct();
		if(empty($this -> db)){
			$this -> load_db();
		}
	}
	
	public function get_brand( $limit = 2000 )
	{
		//var_dump( $this->db );
		$sql_query = " SELECT bra_id, bra_name  FROM  ".$this -> db -> prefix."brand  WHERE 1 and bra_enabled = 1 GROUP BY bra_id ORDER BY `bra_list` limit $limit ";
		return $info = $this -> db -> select_info($sql_query);

		/*
		$psInfo = array();
		foreach ($infosm as $rowkey => $rowval)
		{
				if($rowval["bra_parent_id"] == 0)
				{
					$psInfo[$rowval["bra_id"]]['bra_id'] = $rowval["bra_id"] ;
					$psInfo[$rowval["bra_id"]]['bra_name'] = $rowval["bra_name"] ;
					$psInfo[$rowval["bra_id"]]['bra_parent_id'] = $rowval["bra_parent_id"] ;
				}else{
					$psInfo[$rowval["bra_parent_id"]]['array'][] = $rowval;	
				}
				$psInfoval[$rowval["bra_id"]] = $rowval["bra_name"] ;
		}
		
		//$this -> view -> assign('psInfoval',$psInfoval);		//列排表显示使用
		
		//$this -> view -> assign('psInfo',$psInfo);		
		//return $psInfo;
		*/
	}
	

} 