| 1234567891011121314151617181920212223 | 
							- <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); 
 
- class Model_distribution extends Lin_Model 
 
- {
 
- 	function __construct(){
 
- 	parent::__construct();
 
- 	$this->load->database();
 
- 	$this->table = 'distribution';
 
-     $this->load_table('distribution');
 
- }
 
- 	/** 通过API查找 */
 
- 	public function get_title($title)
 
- 	{
 
- 		return  $this->find("title = '$title'");	
 
- 	}
 
- 	public function get_pid($pid)
 
- 	{
 
- 		return  $this->find("pid = '$pid'");	
 
- 	}
 
- 	public function ge_size($category,$size)
 
- 	{
 
- 		return  $this->find("category = '$category' and size = '$size'");	
 
- 	}
 
- }  //end class
 
 
  |