One way to do it would be to replace

echo "$mealcode<BR>";

with

switch ($mealcode) {
case "B": echo "Breakfast<br>"; break;
case "L": echo "Lunch<br>"; break;
default: echo "???<br>"; break;
}

The default case should never be executed if your data is clean, but the
questions marks will alert you if there's something other than B or L in the
mealcode field.




On 5/11/06, William Watson <[EMAIL PROTECTED]> wrote:
>
> My question is, "How can I read the value "B" from the mealcode
> field in the mysql database as "B", but tell my Online reporting
> program to convert the "B" into the word Breakfast?" I need to do
> the same thing with Lunch.


[Non-text portions of this message have been removed]





The php_mysql group is dedicated to learn more about the PHP/MySQL web database possibilities through group learning.



SPONSORED LINKS
American general life and accident insurance company American general life insurance company American general life
American general mortgage American general life insurance Computer internet security


YAHOO! GROUPS LINKS




Reply via email to