title: Object of class stdClass could not be converted to int
body: <p>I have error like this
  Object of class stdClass could not be converted to int</p>
  
  <p>controller</p>
  
  <pre><code>if ($this-&gt;input-&gt;post('nama') == 'pendek boju jeans') {
                      $a=0.810;
                  }else{
                      $a=1.144;
                  }
                  $kain= $this-&gt;input-&gt;post('id_kain');
                  $b=$this-&gt;jeans_model-&gt;luaskain($kain);
                  $tpotongan=round($a/$b);
  </code></pre>
  
  <p>model</p>
  
  <pre><code>    public function luaskain($kain)
    {
      $this-&gt;db-&gt;select("ukuran");
      $this-&gt;db-&gt;from("bahankain");
      $this-&gt;db-&gt;where('id_kain',$kain);
      $query = $this-&gt;db-&gt;get();
      return $query-&gt;row();
    }
  </code></pre>
  
  <p>in my model get value from bahankain.ukuran like this</p>
  
  <pre><code>|ukuran|
  |800|
  </code></pre>
  
  <p>why error <code>Object of class stdClass could not be converted to int</code>
  and how to solve this?</p>