Working with variables and MySQL



I have a MySQL database table that keeps track of lots of numbers for
event outcomes.

For simplicilty, and to make it easy for arithmetic work, and to keep the
database small, all the variables are of type integer. However, I have
entered into the tables scores that that are not normally expected to
indicate specific conditions, like (integer) 44 for example meaning
"Event Cancelled" etc.

While I have no problem reading the MySQL table row data out into a
webpage (see code below), I do not know how to do text substitutions
WITHOUT changing the database data, ie. only substitute as it's being
read out of the database. I'm still very sketchy on arrays, and that's
what's causing the problem for me.

So I have something like the following;


while ($row = @mysql_fetch_array($theresults))
{
$Theid = $row['EnteredNumber'];
$1stresult = $row['Finished1'];
$2ndresult = $row['Finished2'];


$display_entry .= "$Theid, $1stresult, $2ndresult<BR>";
}

The variables to display on the webpage are many more than the three
above, and all have different names.

So rather than the above code displaying on the webpage:
1, 3, 44

It would display:
1, 3, Cancelled

Can anyone help. Thanks
.



Relevant Pages