dslreports logo
site
 
    All Forums Hot Topics Gallery
spc

spacer




how-to block ads


Search Topic:
uniqs
3
share rss forum feed


cdru
Go Colts
Premium,MVM
join:2003-05-14
Fort Wayne, IN
kudos:7
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.