This question already has an answer here:
I've been playing around with this query for a while but I'm getting the:
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in
C:\xampp\htdocs\Manny\FantasyMockProject\test.php on line 50
Which is telling me I'm not using the query correctly. My original query is like so:
$simulateQuery1 = mysql_query("SELECT * FROM player2 WHERE
preranking >= " .$_SESSION['max_pick']. " ORDER BY RAND() LIMIT 1");
I want to return all columns from the player2 table where preranking >= $_SESSION['max_pick'] also I want to include the ORDER BY RAND() LIMIT 1
Is this possible using only 1 query? Thanks.
[EDIT: Found the mistake. I had missing ' ' around my Session variable.]
</div>