Code: Select all
$result = mysql_query("SELECT * FROM wallpapers WHERE resolution = '$resolution' ORDER BY id DESC LIMIT $random, 1")I've tried putting $random in quotes, spacing it differently, etc. but I have no idea what is causing the error. Any ideas?You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 1' at line 1
Thanks!