Model_purchasedetailed.php 897 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
  2. class Model_Purchasedetailed extends Lin_Model
  3. {
  4. function __construct(){
  5. parent::__construct();
  6. $this->load->database();
  7. $this->table = 'purchasedetailed';
  8. $this->load_table('purchasedetailed');
  9. }
  10. /** 通过类目查找 */
  11. public function get_category($category)
  12. {
  13. return $this->find("category = '$category'");
  14. }
  15. /** 通过尺寸查找 */
  16. public function get_size($size)
  17. {
  18. return $this->find("size = '$size'");
  19. }
  20. /** 通过等级查找 */
  21. public function get_grade($grade)
  22. {
  23. return $this->find("grade = '$grade'");
  24. }
  25. /** 通过花型查找 */
  26. public function get_lowe($lowe)
  27. {
  28. return $this->find("lowe = '$lowe'");
  29. }
  30. /** 通过颜色查找 */
  31. public function get_color($color)
  32. {
  33. return $this->find("color = '$color'");
  34. }
  35. } //end class