Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Binary, Displays Yes or No

New Here ,
Aug 19, 2008 Aug 19, 2008

Copy link to clipboard

Copied

I have a binary entry in my database I am using it as 0 for No and 1 for yes. How do I get it to display Yes and No on the website instead of 0 & 1.

Thank You Again
Rab
TOPICS
Server side applications

Views

235
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 19, 2008 Aug 19, 2008

Copy link to clipboard

Copied

> I have a binary entry in my database I am using it as 0 for No and 1 for
> yes. How do I get it to display Yes and No on the website instead of 0 &
> 1.

pseudo code:

if yourField = 0 then
display 'no'
else
display 'yes'
end if

-Darrel

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 19, 2008 Aug 19, 2008

Copy link to clipboard

Copied

.oO(Rabastan99)

>I have a binary entry in my database I am using it as 0 for No and 1 for
>yes. How do I get it to display Yes and No on the website instead of 0
>& 1.

Some code please. What scripting language? Or do it in SQL, but even
then it would help to see the query.

Micha

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 20, 2008 Aug 20, 2008

Copy link to clipboard

Copied

LATEST
Michael Fesser wrote:
> .oO(Rabastan99)
>
>> I have a binary entry in my database I am using it as 0 for No and 1 for
>> yes. How do I get it to display Yes and No on the website instead of 0
>> & 1.
>
> Some code please. What scripting language? Or do it in SQL, but even
> then it would help to see the query.
>
> Micha

I like doing it in SQL

SELECT CASE binaryEntry WHEN 0 THEN 'No' WHEN 1 THEN 'Yes' END AS
NewBinaryEntryName

Dooza

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines