Advertisement
Guest User

Untitled

a guest
Apr 1st, 2015
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. Fatal error: Call to undefined method supp_model::getsuppid() in C:wampwwwminimartapplicationcontrollersminimart.php on line 19
  2.  
  3. class minimart extends CI_controller { //myclass
  4.  
  5.  
  6. function __construct()
  7. {
  8.  
  9. parent::__construct();
  10. }
  11.  
  12.  
  13.  
  14. function supplier()
  15. {
  16. $this->load->model('supp_model');
  17. $id = $this->uri->segment(3);
  18. $mini['allrecords']= $this->supp_model->getsuppid($id); //this line give me an error
  19. $this->load->view('view_supplier.php', $mini);
  20. }
  21.  
  22. class supp_model extends CI_Model {
  23.  
  24.  
  25.  
  26. function getsuppid($id) //the function exist
  27. {
  28. $this->db->select('*');
  29. $this->db->from('supplier_table');
  30. $this->db->where('supplier_code ', $id);
  31. $q = $this->db->get();
  32. $result = $q->result();
  33. return $result;
  34. }
  35.  
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement