title: Trying to get property of non-object on codeigniter in ajax error access
body: <p>I have a code to cek if the user is exist. I return some data to display to user. This is my code 
  <strong>Model</strong></p>
  
  <pre><code>public function cek_exist_master($no_eir){
      $this-&gt;db-&gt;select('REPAIR_ESTIMATE_ID, EIR_REF');
      $this-&gt;db-&gt;where('EIR_REF', $no_eir);
      $query = $this-&gt;db-&gt;get('tb_master_repair_estimate');
      return $query;
  }
  </code></pre>
  
  <p><strong>CONTROLLER</strong></p>
  
  <pre><code>$cek_master =$this-&gt;m_surveyor-&gt;cek_exist_master($this-&gt;input-&gt;post('EIR_REF'));
  echo $cek_master-&gt;row()-&gt;REPAIR_ESTIMATE_ID;
  </code></pre>
  
  <p>And this is the database looked like :</p>
  
  <pre><code>mysql&gt; desc tb_master_repair_estimate;
  +--------------------+-----------------------+------+-----+-------------------+-----------------------------+
  | Field              | Type                  | Null | Key | Default           | Extra                       |
  +--------------------+-----------------------+------+-----+-------------------+-----------------------------+
  | REPAIR_ESTIMATE_ID | int(11)               | NO   | PRI | NULL              | auto_increment              |
  | EIR_REF            | varchar(30)           | YES  | UNI | NULL              |                             |
  | NO_TANK            | int(11)               | YES  | MUL | NULL              |                             |
  | COSTUMER_ID        | int(11)               | YES  | MUL | NULL              |                             |
  | TANK_ID            | int(11)               | YES  | MUL | NULL              |                             |
  +--------------------+-----------------------+------+-----+-------------------+-----------------------------+
  </code></pre>
  
  <p>24 rows in set (0.01 sec)</p>
  
  <p>CI gives me an error like this,</p>
  
  <pre><code>A PHP Error was encountered
  
  Severity: Notice
  
  Message: Trying to get property of non-object
  
  Filename: surveyor/c_surveyor.php
  </code></pre>
  
  <p>Any help it so appreciate</p>
  
  <p><strong>Update</strong>,</p>
  
  <p>Sorry, have bad copy paste on stackoverflow. I still get those error untill Now</p>