I am trying to display a boolean value (0 or 1) as No or Yes in a web page. I am retrieving the value from a MySQL database. I am just trying to find a simple way to convert the data once it hits the page.
I am trying to display a boolean value (0 or 1) as No or Yes in a web page. I am retrieving the value from a MySQL database. I am just trying to find a simple way to convert the data once it hits the page.
October 15th, 2010 on 8:30 am
I assume you are using one of the programing language to get data from mysql server.
for example you are using JDBC/ODBC to get data
let assume you get a variable $i which has a value 1 or 0
This is just pseudo code
if ($i == 1)
{
print "<h1>YES</h1><br />";
}
else if ($i==0)
{
print "<h1>NO</h1><br />";
}
you can print these yes or no in some html page, and that page can be used with webserver.
I hope this helps
for any help send a mail to help@paijwar.com