title: Message: Undefined property: stdClass in codeigniter
body: <p>I got this error:</p>
  
  <blockquote>
    <p>A PHP Error was encountered  Severity: Notice  Message:  Undefined property: stdClass::$positionsNum</p>
  </blockquote>
  
  <p>when i run.</p>
  
  <p><strong>My model</strong>:</p>
  
  <pre><code>public function load_job($id){        
      $Where = array('jobs.id' =&gt; $id);
      $this-&gt;db-&gt;select('jobs.id, positionsNum, companyName, contract_type.titleEN as contractType');
      $this-&gt;db-&gt;from('jobs');
      $this-&gt;db-&gt;join('contract_type', 'jobs.contractTypeId = contract_type.id', 'left');
      $this-&gt;db-&gt;where($Where);
      $Result = $this-&gt;db-&gt;get(); 
      return $Result-&gt;first_row() ; 
  } 
  </code></pre>
  
  <p><strong>my view</strong>:</p>
  
  <pre><code>   &lt;?php if(isset($job) &amp;&amp; count($job) &gt; 0){   ?&gt;
     &lt;div class="row job-detail-row"&gt;
        &lt;div class="col-lg-6 job-detail-label"&gt;&lt;?php echo lang('contractType'); ?&gt;&lt;/div&gt;
         &lt;div class="col-lg-6"&gt;&lt;a href=""&gt;&lt;?php  if(isset($job-&gt;contractType)) echo $job-&gt;contractType; ?&gt;&lt;/a&gt;&lt;/div&gt;
        &lt;/div&gt;
  
        &lt;div class="row job-detail-row"&gt;
          &lt;div class="col-lg-6 job-detail-label"&gt;&lt;?php echo lang('num_vacancies'); ?&gt;    &lt;/div&gt;
          &lt;div class="col-lg-6"&gt;&lt;?php  echo $job-&gt;positionsNum; ?&gt;&lt;/div&gt;
        &lt;/div&gt;
        &lt;?php } ?&gt;
  </code></pre>
  
  <p><strong>my Controller's function</strong>:</p>
  
  <pre><code>public function job() {
  
      $job_id = $this-&gt;uri-&gt;segment(3);
  
      if(isset($job_id) &amp;&amp; !empty($job_id))
      {
          //one job
          $job = $this-&gt;job_model-&gt;load_job($this-&gt;GetLang, $job_id);
          $data['job'] = $job;
          $this-&gt;load-&gt;view( 'front/singleJob', $data);
      }
  }
  </code></pre>
  
  <p>Also, i printed the returned object and it returns this:</p>
  
  <pre><code>stdClass Object(
     [id] =&gt; 9
     [positionsNum] =&gt; 2
     [companyName] =&gt; 
     [contractType] =&gt; type1
    )
  </code></pre>
  
  <p>But, <code>contractType</code> won't be printed in page even if it is already has a value.
  I can't figure out the problem. Any help?</p>