database view OR condition
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2017 09:58 AM
Hello,
Can anyone tried to add OR condition in the where clause in database view?
(cat_u_category =inc_category && ( cat_u_subcategory = '' OR inc_subcategory = '' ) )
I have tried this but it is not working. when I removed the OR and replaced by && it is working.
Thank you

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2017 09:59 AM
Try using the JS-style " || " operator instead of "OR".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2017 10:02 AM
I tried this cat_u_category =inc_category && cat_u_subcategory = '' and it is not getting the records tho.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2017 10:06 AM
Patrick I think the || will work. But trying this query cat_u_category =inc_category && cat_u_subcategory = '' this is not working I guess that null field values is not grabbing into the database view.,