hello,
say i get all entries in mySQL db with a for loop
so it lists. 1 2 3 4 5
now...say i only want to display entry 3 to entry 5, what loop condition would i create to do that?
having trouble with this
thanks 🙂
Use the limit directive in your SQL query to cause MySQL to only return the ones you want. Example:
SELECT * FROM my_table LIMIT 3, 5
This causes Mysql to return 5 records starting with #3, so you would get record numbers 3, 4, 5, 6 and 7.