I have the following code:
$mostRecent = mysql_query("SELECT couponID FROM users_coupons WHERE userID = '$userID' ORDER BY id LIMIT 3");
while($row = mysql_fetch_array($mostRecent))
{
$mostRecentArr = $row;
}
var_dump($mostRecentArr);
The same SQL query in the command line returns 3 results, but this code only returns one result, even though I put LIMIT 3. Any help?