Run the following afterward to see what SQL is being generated and test that SQL outside of FUEL in your MySQL management tool (e.g. Sequel Pro, phpMyAdmin): $CI->members_model->debug_query();
The active = "yes" is being added by the Base_module_model::_common_query() which is inherited by your model and can be overwritten.
The _common_query() method is called on every find_* methods to apply extra active record syntax for your results like joins and additional select items.
To override the method, just create that method on your model like so: function _common_query(){
//... put your content here or nothing at all if you don't want to have a "_common_query"
}
Comments
$CI->members_model->debug_query();
WHERE 'active' = 'yes'
but since the active column isn't enum, it's tinyint for 1 or 0.
I used that to minimize complications with the pre-built script I'm using, plus that worked okay in the CMS.
Perhaps there's a flag I'm missing, or a table class function I can use instead to avoid checking 'active' and allow me to select my own?
BTW, that's a great piece of code to know!
The _common_query() method is called on every find_* methods to apply extra active record syntax for your results like joins and additional select items.
Yes... I use debug_query() a lot.
function _common_query(){ //... put your content here or nothing at all if you don't want to have a "_common_query" }
Thanks!