I am trying to exclude entries that either have no value or a value of "0" in a field, but am running into problems with the 'search:' parameter.
works and excludes all entries that have no value in that field.
As I also want to exclude fields with the value of zero, I changed it to:
This threw this error:
Error Number: 1054 Unknown column 'wd.field_id_8NOT' in 'where clause' SELECT DISTINCT(t.entry_id) FROM exp_channel_titles AS t LEFT JOIN exp_channels ON t.channel_id = exp_channels.channel_id LEFT JOIN exp_channel_data AS wd ON wd.entry_id = t.entry_id LEFT JOIN exp_members AS m ON m.member_id = t.author_id INNER JOIN exp_category_posts ON t.entry_id = exp_category_posts.entry_id INNER JOIN exp_categories ON exp_category_posts.cat_id = exp_categories.cat_id WHERE t.entry_id !='' AND t.site_id IN ('1') AND t.entry_date < 1358591770 AND (t.expiration_date = 0 OR t.expiration_date > 1358591770) AND t.channel_id = '2' AND exp_categories.cat_id = '68' AND t.status = 'open' AND ( (wd.site_id=1 AND wd.field_id_8!="") AND (wd.site_id=1 AND wd.field_id_8NOT LIKE "%0%") ) Filename: modules/channel/mod.channel.php Line Number: 2660
throws the same error.
I then tried:
search:product_inventory="= not 0"
which successfully excluded the entries with a '0' in that field.
I changed this to:
search:product_inventory="= not 0|IS_EMPTY"
but this time the 'IS_EMPTY' is being completely ignored and all entries that have no value in that field are still returned.
How can I successfully exclude entries that have no value or a value of '0' in that field?
I am running EE v.2.5.3.