in reply to Re^2: Substitute "Yes" for "1" in mysql query output?
in thread Substitute "Yes" for "1" in mysql query output?
As a practical matter, I use SQLite for all my DB work unless I need to use another DB (and that can happen for a lot of reasons). SQLite does not have a boolean type..it is only an int. So a value like "3" could conceivably show up. My code only recognizes '1' as the 'True' value. No insurance company or provider is going to work with a DB that does not have a boolean data type.#!/usr/bin/perl use strict; use warnings; my $preauth=3; print qw(No Yes)[$preauth]; # No output at all! print ($preauth eq '1' ? "Yes" : "No"); # Prints No
It appear to me that Re: Substitute "Yes" for "1" in mysql query output? is the way to go... Put this yes/no decision into the SQL solution space.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Substitute "Yes" for "1" in mysql query output?
by soonix (Chancellor) on Jan 26, 2017 at 11:01 UTC | |
by Marshall (Canon) on Jan 26, 2017 at 12:32 UTC |