Hello i am new at php.
$res=mysql_query('SELECT `order` FROM `competitions`');
$row=mysql_fetch_row($res);
if($row[order] == "1")
{
$res=mysql_query('SELECT `name`, `persp`, `teamp` FROM `competitions_rank` WHERE `comp_id` = '.$_PARAMS[0].' ORDER BY `persp` DESC');
}
else
{
$res=mysql_query('SELECT `name`, `persp`, `teamp` FROM `competitions_rank` WHERE `comp_id` = '.$_PARAMS[0].' ORDER BY `teamp` DESC');
}
In the database the possible values of the field is null, 1 or 2 .The code always enter in else statement. What i do wrong ? How i should check value in array returned by mysql_fetch_row ?