<?php 
class Pro_type_mod  extends HC_Controller
{
	public function __construct()
	{
		parent::__construct();
		if(empty($this -> db)){
			$this -> load_db();
		}
	}
	
	public function get_pro_type( $limit = 2000 )
	{
		//var_dump( $this->db );
		$sql_query = " SELECT prt_id, prt_name  FROM  ".$this -> db -> prefix."pro_type  WHERE 1 and prt_enabled = 1 GROUP BY prt_id ORDER BY `prt_id` limit $limit ";
		return $info = $this -> db -> select_info($sql_query);

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

} 