Codeigniter db->get() returns empty recordset
19:53 15 Feb 2015

My table user is as follows:

    | user_id | first_name | moniker     |
    |       1 | Noah       | noahsarkive |
    |       2 | Homer      | HomerK      |
    |       3 | Hot        | Inflated    |
    |       4 | Wimpy      | Wimpy B     |
    |       5 | Hubble     | SharpEyes   |

The model is User_model.php:

db->select('user_id','first_name', 'moniker');
    $this->db->from('user');
    $rs = $this->db->get();
    var_dump($rs);
    return $rs;
}
}

but when I do a var_dump($rs) it yields:

object(CI_DB_mysql_result)#25 (8) {
  ["conn_id"]=>
  resource(25) of type (mysql link persistent)
  ["result_id"]=>
  resource(36) of type (mysql result)
  ["result_array"]=>
  array(0) {
  }
  ["result_object"]=>
  array(0) {
  }
  ["custom_result_object"]=>
  array(0) {
  }
  ["current_row"]=>
  int(0)
  ["num_rows"]=>
  int(5)
  ["row_data"]=>
  NULL
}

It returns the correct number of rows but no data! Couldn't be simpler, but I must be missing something very obvious.

I appreciate your help. Noah

php mysql codeigniter query-builder resultset