Trying to select some specific arrays from my mysql database, I used this:
$result2 = mysql_query("SELECT `id`,`title`, `author`, `publication`, `series`, `price`, `image`, `description`, `quantity`, `status` FROM `books` WHERE `id` >= '$p1' AND `id` =< '$p2' ORDER BY id DESC") or die(mysql_error());
$p1 and $p2 are multiples of 5. for example: 0 and 5, 5 and 10, 10 and 15; but using this code, I faced this error not knowing how to fix it!
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 '=< '15' ORDER BY id DESC' at line 1
Thank you for guiding me.