This topic is locked

viewing images not in order

4/25/2022 5:14:46 PM
PHPRunner General questions
P
ppradhan@live.com author

Hi, can anyone help me how to sort pictures according to its name and display in order 1,2, 3, 4, 5.... etc.

I have a table - 'Course' with fields: course_id, course_name, lesson_no, lesson_name, slides

in slides field I can upload multiple images with names - 1, 2, 3, 4, 5, 6,7 ,8
after uploading images and viewing this table - these images appear in random order and not continues.

Is there a way to view continues in order 1,2,3.... and so on?

Please advise.

Sergey Kornilov admin 4/25/2022

There is no defined order of images. When you upload a bunch of images, browser uploads them in a random order. If you want to display images in a specific order and let users change this order - you will have to use an additional table to store images and an extra field to store the image order.