Just wondering if there is any way to pull this off.
$query = "SELECT * FROM magic where race = $row[race] and class = $row[class] and level <= $row[level] order by spell asc"; $maresult = mysql_query($query) or die(mysql_error());
coopster
4:26 am on Apr 24, 2006 (gmt 0)
Are you asking if you can have ANDs and ORs in your WHERE clause? Yes, absolutely.
Habtom
7:48 am on Apr 24, 2006 (gmt 0)
//$query = "SELECT * FROM magic where race = $row[race] and class = $row[class] and level <= $row[level] order by spell asc";
You might need to put it this way:
$query = "SELECT * FROM magic where race = '". $row[race] ."' and class = '". $row[class] ."' and level <= '". $row[level] ."' order by spell asc";