Fort Wayne, IN
|reply to Nordy |
Re: Output one field, Output the next based on true or false
Alternatively, just do it in the SQL query. Check to see if the *_s column is 1 or 0 and alter the corresponding column with whatever value you want to show if it's not to be shown.
The solution that you show above is acceptable too. You get dinged slightly as you are returning all the information, regardless if you are to display it or not. But if your result sets are small enough to performance penalty would be negligible. But if you need it for some other reason then you'd have it.