ini_set('register_globals', 'on'); import_request_variables('cpg'); ?> $selreg = $region; $selage = $age; $selpref = $prefs; if (($region == 0) && ($age == 0) && ($prefs == 0)) { $error = 1; include("stats.php3"); exit; } include("init.php3"); $and = ""; if ($age > 0) { $and .= " AND age=$age"; } if ($region > 0) { $and .= " AND regionid=$region"; } if ($prefs > 0) { $and .= " AND preference=$prefs"; } $query = "SELECT childcolor,count(*) FROM passport WHERE regcolor<>childcolor $and GROUP BY childcolor"; $res1 = mysql_query($query); $num1 = mysql_num_rows($res1); $query = "SELECT count(*) FROM passport WHERE regcolor=childcolor $and "; $res2 = mysql_query($query); list($num2) = mysql_fetch_row($res2); if (($num1 + $num2) == 0) { $error = 2; include("stats.php3"); exit; } ?>
|
|||||||||||