- Impact
- 19
Hey
Code:
i am trying to get it to output ONLY the results where health and money are > 20
what do i do? can i just put it in in the QUERY ?
Code:
PHP:
<?
$country = $_GET['country'];
$searchpass = $_GET['searchpass'];
$dbusername="zubair";
$dbpassword="";
$database= "z_game";
if ($searchpass == "aa") {
mysql_connect(localhost, $dbusername, $dbpassword);
@mysql_select_db($database) or die("Unable to select database");
$sql = mysql_query("Select * From user where country = '".$country."' ORDER BY RAND() LIMIT 3") ;
while ($row = mysql_fetch_assoc($sql)) {
echo $row['username'] . "\n" ;
echo "?\n";
echo $row['health']. "\n" ;
echo "?\n";
echo $row['level']. "\n";
echo "?\n";
echo $row['money']. "\n";
echo "?\n";
}
}
else {
echo "error\n";
}
?>
what do i do? can i just put it in in the QUERY ?








