It looks like you're new here. If you want to get involved, click one of these buttons!
because obviously if you use a $where array u can only specify positive comparisons ie KEY equals VALUE.
$where = 'published = "yes" AND name NOT LIKE "Music"';
...->options_list('id', 'name', $where);
where $exclude is an associative array mapping fields (column) and values. In the case above we'd have
options_list('key', 'value', $where, [$order], [$exclude])
Not that I have anything against $where strings, it's just that it would help keeping the code nice and tidy...
$where = array('published' => 'yes');
$exclude = array('name' => 'Music', 'name'=>'Photos', 'id' => 0);
..->options_list('id', 'name', $where, NULL, $exclude);
Comments
array('published' => 'yes', 'name !=' => 'Music' ); ..->options_list('id', 'name', $where, NULL);
Also, in the example above, there are two key names of "name" so the first one is overwritten in the $exclude array.
PS about the duplicated array key in my example, i know, i confused 'name' as a key with 'name of field' as a variable
http://codeigniter.com/user_guide/database/active_record.html