It looks like you're new here. If you want to get involved, click one of these buttons!
class Teammembers_model extends Base_module_model {
...
function find_directors()
{
// use straight CI query to take advantage of the 'not in' SQL, which
// apparently isn't available to find_all
$display_order = array('Chair', 'Vice-Chair', 'Treasurer', 'Secretary');
parent::_common_query(); // to do active and published
$this->db->where_not_in('role_position', $display_order);
$Q = $this->db->get('teammembers');
log_message("INFO", $this->db->last_query());
return $Q->result();
}
$directors = fuel_model('teammembers', array('find' => 'directors'));
Comments
http://www.getfuelcms.com/user_guide/libraries/my_model/table_class_functions
In the mean time, I recalled that CI where() method permits operators in the key of the array ... so I was able to use the following
$where = array('role_position NOT ' => $display_order); return $this->find_all($where);
which gave me 'WHERE role_postion NOT IN ()"
Different approaches to the same end. I think this is a little more FUEL-like.