fruid Posted May 18, 2020 Share Posted May 18, 2020 how do I return an array of children on which a certain boolean field is set to false? $pages->get("fieldname=false"); $pages->find("fieldname=false"); $pages->child("fieldname=false"); $pages->children("fieldname=false"); $pages->fieldname(false); … please help me stop the guessing ? Link to comment Share on other sites More sharing options...
kongondo Posted May 18, 2020 Share Posted May 18, 2020 Assuming you have a field called 'checkbox' of type Checkbox // these two will return identical results $found = $pages->find("checkbox=1");// find those whose values equal 1 // OR $found2 = $pages->find("checkbox!=''");// find those that are not empty // highly recommended; use Tracy :-) bd($found,'found 1'); bd($found2,'found 2'); Boolean fields will be stored as true = 1. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now