Model_commodityread.php 847 B

123456789101112131415161718192021222324252627282930
  1. <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
  2. class Model_Commodityread extends Lin_Model
  3. {
  4. function __construct(){
  5. parent::__construct();
  6. $this->load->database();
  7. $this->table = 'commodityread';
  8. $this->load_table('commodityread');
  9. }
  10. public function get_productid($productid,$skuid)
  11. {
  12. return $this->find("productid = '$productid' and skuid = '$skuid'");
  13. }
  14. public function get_tbproduct($productid,$skuid)
  15. {
  16. return $this->find("productid = '$productid' ".$skuid);
  17. }
  18. public function get_code($productid,$code)
  19. {
  20. return $this->find("productid = '$productid' and code = '$code'");
  21. }
  22. public function get_sku($code)
  23. {
  24. return $this->find("code = '$code'");
  25. }
  26. public function get_skuid($skuid)
  27. {
  28. return $this->find("skuid = '$skuid'");
  29. }
  30. } //end class