title: Uncaught exception 'No_Result_Exception' with message 'No results'
body: <p>I'm working with this codeigniter script called Crysandrea, anyways everything was going smoothly until I tried out the trading system. </p>
  
  <p>Here is the error.</p>
  
  <blockquote>
    <p><strong>Fatal error</strong>: Uncaught exception 'No_Result_Exception' with message 'No results' in C:\xampp\htdocs\application\core\CRYS_Model.php:97
    Stack trace: #0 C:\xampp\htdocs\application\core\CRYS_Model.php(190):
    CRYS_Model->_process_result(Object(CI_DB_mysql_result), 1) #1
    C:\xampp\htdocs\application\controllers\trades.php(535):
    CRYS_Composite_Model->findRelation('3', '1', '*', Array) #2 [internal
    function]: Trades->accept_trade('2') #3
    C:\xampp\htdocs\system\core\CodeIgniter.php(359):
    call_user_func_array(Array, Array) #4 C:\xampp\htdocs\index.php(203):
    require_once('C:\xampp\htdocs...') #5 {main} thrown in
    C:\xampp\htdocs\application\core\CRYS_Model.php on line 97</p>
  </blockquote>
  
  <p>Here's the code for CRYS_Model.php</p>
  
  <pre><code>protected function _process_result(&amp;$result, $limit=1) {
          if (!$result-&gt;result_array())
              throw new No_Result_Exception();
          if ($limit === 1)
              return $result-&gt;row(0, static::$INNER_MODEL);
          else
              return $result-&gt;result(static::$INNER_MODEL);
  }
  </code></pre>
  
  <p>If you need anything, please say so! </p>