Hi, i have a weird problem.
when I do this:
$one = mysql_query("SELECT COUNT(*) FROM Gameone WHERE Disabled = ''");
if (!$one) { echo("<P>Error performing query: " . mysql_error() . "</P>"); exit();}
echo("$one");
$one = $one-1;
if ($one == 0)
{
$prizeone = 0;
}
else
{
$prizeone = $one*$price/2;
}
$two = mysql_query("SELECT COUNT(*) FROM Gametwo WHERE Disabled = ''");
if (!$two) { echo("<P>Error performing query: " . mysql_error() . "</P>"); exit();}
echo("$two");
$two = $two-1;
if ($two == 0)
{
$prizetwo = 0;
}
else
{
$prizetwo = $two*$price/2;
}
I have two entries in the table Gameone so with the above $one = 2 which is fine. Now when I echo $two it increments and reads as 4. Why does it increment and equal 4 and not 0?