Re: Viewing Data From MySQL
| From: | dpgirago at mdanderson dot org | Date: | Wed, 03 Sep 2003 15:36:40 +0000 |
| Subject: | Re: Viewing Data From MySQL | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-30305@lists.php.net to get a copy of this message | ||
Yes, easily. Use the 'if' conditional in mysql...
select if(col_name = 1, 'yes', 'no') from table_name;
David
"Shaun" <shaun@mania.plus.com>
09/03/2003 10:32 AM
To:
php-db@lists.php.net
cc:
Subject:
[PHP-DB] Viewing Data From MySQL
Hi,
Is it possible to change the way a query is displayed from a MySQL
database.
For example if I have a column that contains '1' or '0' can I run a query
that returns 'Yes' for every '1' and 'No' for every '0'?
Thanks for your help
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php