Not sure if this is intended or known or a bug or whatever… but in the Beta 3.0.0 build i seemed to have lost the ability to use a number of conditions in the Database Query builder.
In the screenshot below i am selecting a ‘is_active’ boolean field (mySQL tinyint) and setting a condition with a GET variable.
I can now only select a very short list of conditions. Previously i had many more including ‘Greater Than or Equal To’ which is what i need in my case.
Is this something that will be fixed or will i need to use a custom query.
For my use case, i am using a button to toggle Including or excluding items with the ‘is_active’ field set to 0. I do not want to show either or, i want to toggle including them or not, which is where using greater than or equal to as the condition achieved that.
A boolean is only “1” or “0” and so it only needs those four options.
As your $_GET ‘is_active’ field set to 0 then the options “equal” or “not equal” are all you need.
Although…when I think about i could still achieve it another way… Have no filter when I want to return both true and false and then use equal to true when I just want that… Achieves the same result just different configurations
I am adjusting a project to allow read or read/write permissions. It was set up with tinyint(1) for the database field for each of the permissions set at 1 or 0 so the tinyint(1) being treated as boolean worked. I believe, though, that tinyint(1) can hold values up to 127 and I wanted to use 1 for read, and 2 for read/write.
The boolean-only approach then does not work because I need the greater than operator to encompass both 1 and 2 having read access (which should be an option as tinyint is not always boolean!)
I appreciate I could change the columns to INT(1) instead but the point is that MySQL allows other values than 1/0 in tinyint which IMHO should be catered for.