I have a single DB table (MySQL) which I am running a simple SELECT on. In this table I have 3 fields which contain 3 possible values each. In each case the values are identical ('none','online','physical'). I want to return in my result a true or false value for an alias if any one of these fields are not set to 'none'.
I can easily evaluate this in PHP after I've returned my result set but in order to sort my results easily I would rather generate the true/false in the SELECT if possible. So at present a result row might look like this:
id: 1
trial_type_1: none
trial_type_2: online
trial_type_3: none
In this case I want the query to return:
id: 1
trial: True
If all the trial_type fields were set to none then it would return a trial value of False. Any ideas greatly appreciated since I really have no idea where to start or even what to search for online! :)