Welcome Guest, Not a member yet? Register   Sign In
Undefined property
#1

I think the program is correct, but it appears that it is an error. Please someone help me.

A PHP Error was encountered
Severity: Notice
Message: Undefined property: mysqli::$ProductID
Filename: controllers/ProductsUI.php


CI_Model:
PHP Code:
function get_product(){
 
      $this->load->database();
 
      return $this->db->get('product');
 
  

CI_Controller:
PHP Code:
$str '';
 
       $this->load->model('Product');
 
       foreach($this->Product->get_product() as $row){
 
           $str += 'tr role="row">
            <td>'
.$row->ProductID.'</td>
            <td>'
.$row->Product_Name.'</td>
            <td>'
.$row->Cost.'</td>
            <td><button>แก้ไข</button></td>
            <td><button>ลบ</button></td>
            </tr>'
;
 
       
Reply


Messages In This Thread
Undefined property - by suchanon - 12-16-2018, 04:14 AM
RE: Undefined property - by donpwinston - 12-16-2018, 07:36 AM
RE: Undefined property - by dave friend - 12-16-2018, 08:37 AM
RE: Undefined property - by suchanon - 12-16-2018, 05:39 PM
RE: Undefined property - by dave friend - 12-17-2018, 08:19 AM
RE: Undefined property - by suchanon - 12-17-2018, 08:22 PM
RE: Undefined property - by dave friend - 12-17-2018, 09:11 PM
RE: Undefined property - by suchanon - 12-17-2018, 11:20 PM



Theme © iAndrew 2016 - Forum software by © MyBB