well this is my first time using 'AND' in a query so i'm not positive that this is the right way but i thought that it was.
the query is
$query = "SELECT * FROM dragon_points WHERE (points>='$points' AND job='$job') ORDER BY name";
that query seems to return random results, i dont know why =. there is a standard form where the admin chooses the 'job' and 'points'(minimum points) and then passes the information to the script, the script then selects the relative rows from teh database EXCEPT its not doing this right, the only thing its doing right is selecting the right job, it seems to select the people that have that job at random though, its not matching their points to the minimum. the only time it will return the right stuff is when the minimum points is 1, then it'll return all the results within that job =\
the part that outputs the data looks like this(this is only a section and i left out the section that outputs the top of the table)
if ($r = mysql_query ($query)) {
while ($row = mysql_fetch_array ($r)) {
$name = $row['name'];
$id = $row['player_id'];
echo "<tr bgcolor=\"#1F1F1F\"><td>";
echo "<a href=\"http://www.took-out-real-url-for-privacy.net/points/view_by_id.php?id=$id\" class=\"style1\">$name</a>";
echo "</td><td>";
echo $row['points'];
echo "</td></tr>";
}
} else {
die ('<p>Could not retrieve the data becauase: <b>' . mysql_error() . "</b>. The query was $query.</p>");
}
mysql_close();
please if you can, help me out, if you need any other information just let me know.