I have one row that i can SELECT with the following command:
SELECT * FROM uploads WHERE upload_id = $upload_id
But I also want to get the 5 next rows. Using PHP, how can i do that? Order doesn't matter.
You can try:
select * from uploads where upload_id >= $upload_id order by upload_id asc limit 6;
You should also really avoid using select * and instead specify only the fields you need, even if that is all of the fields. That way if the schema changes in the future you aren't returning redundant data.
SELECT * FROM upload WHERE upload_id >= $upload_ID LIMIT 6, assuming things are sorted naturally by that upload_idupload_id?