title: Working with a MY_Model
body: <p>I’m using jamie Rumbelow’s MY model as a way to better deal with my application.</p>
  
  <pre><code>https://github.com/jamierumbelow/codeigniter-base-model
  </code></pre>
  
  <p>The MY_model is the same except I have an added in variable for defining whether or not an item in the db is marked as being soft deleted or not.
  protected $soft_delete_value = 3; </p>
  
  <p>I only have that variable defined and have not altered his code yet to account for this value.</p>
  
  <p>I have two things I want to do with this titles model that I need help understanding.</p>
  
  <pre><code>Titles Table - title_id, title_name, title_status_id
  Title_Statuses_Table - title_status_id, title_status_name
  </code></pre>
  
  <p>What I want it to do is retrieve all of the rows that have a title_status_id of 1 and 2 and 3 because the soft delete value is different than the default set in the MY Model. What I would also like to have is instead of it returning the integer have it return the name of the status.</p>
  
  <p><strong>Expected results:</strong> </p>
  
  <p>An array of objects that contain a title_id, title_name, title_status_name for which the titles have a status id of 1,2, or 3.</p>
  
  <p><strong>Testing</strong></p>
  
  <pre><code>$titles = $this-&gt;titles_model-&gt;get_all();
  echo "&lt;pre&gt;";
  print_r($titles);
  echo "&lt;/pre&gt;"; 
  </code></pre>
  
  <p><strong>Actual results:</strong></p>
  
  <pre><code>SELECT *
  FROM (`titles`)
  WHERE `title_status_id` =  0
  
  &lt;pre&gt;Array
  (
  )
  </code></pre>
  
  <p><strong>My Code</strong> </p>
  
  <pre><code>class Titles_model extends MY_Model 
  {
      /* --------------------------------------------------------------
      * VARIABLES
      * ------------------------------------------------------------ */
  
      /**
      * This model's default database table.
      */
      public $_table = 'titles';
  
      public $primary_key = 'title_id';
  
      /**
      * Support for soft deletes and this model's 'deleted' key
      */
      public $soft_delete = TRUE;
      public $soft_delete_key = 'title_status_id';
      public $soft_delete_value = 4;
      public $_temporary_with_deleted = FALSE;
  
      public function __construct()
      {
          parent::__construct();
      }
  }  
  </code></pre>
  
  <p>Anybody else have any additional ideas/suggestions?</p>
  
  <p>EDIT: </p>
  
  <p>I've been tryign to figure this out all day and have hit a dead end.</p>