Well I'm at a loss for this, so I'm hoping it's one of those easy things that I just glanced over too quickly in the manuals.
I use a PHP page to search a SQL database for football games. I used mysql_num_row($results) to get a list of how many rows there are, and then count down to 0, at which time a if() statement does some funky stuff (ending the results list).
Unfortunately, for some reason, when the counter gets down to 4, it skips to 2 and then back up to 3. I had it printout my results to demonstrate.
6Tulsa v. Morehead St.
5South Florida v. Northern Illinois
4Arizona v. San Diego St.
2Idaho v. Washington St.
3Navy v. Temple
This is the relevant code:
$num = mysql_num_rows($result);
while loop (blah blah blah)
{
$num = $num-1;
if ($num < 1) {
echo $Finished;
}
}
I've tried ==1, <=1, etc to no avail. I've changed around the order of display (from first team to second team) but still same result.
Any ideas?