Chomauk
Programmer
- Jun 8, 2001
- 130
In my recordset I'm returning a value called GameDay which is equal to either 1, 2, 3, 4 or 5. When looping through the recordset, depending on the value of GameDay, I want to display a certain day when it changes. However, it appears when I'm reading the value it does not work.
I tried settype and I tried reading the case values inside single quotes and I tried comparing GameDay with $GameDay in the if statement. What am I doing wrong? Thanks
"Failure is the tuition you pay for success."
~ Walter Brunell ~
I tried settype and I tried reading the case values inside single quotes and I tried comparing GameDay with $GameDay in the if statement. What am I doing wrong? Thanks
Code:
switch($ReturnRow1["GameDay"):
case 1:
$gameDay = "Thursday";
case 2:
$gameDay = "Friday";
case 3;
$gameDay = "Saturday";
case 4:
$gameDay = "Sunday";
case 5:
$gameDay = "Monday";
default:
$gameDay = "Does not work";
endswitch;
if($gameDay != $previousDay); {
echo $gameDay;
$previousDay = $gameDay;
}
"Failure is the tuition you pay for success."
~ Walter Brunell ~