I want to do a circular sequence to output pictures. Don"t know how to write this code?
Table structure
for example, now the field ID of key=1 is 1, 2, 5, 7, 10, 11, 6 fields
I want to output one at a time in order.
output id 1 field for the first time
output id 2 field for the second time
.
output id 11 field for the 6th time
output id 1 field for the 7th time
output id 2 field for the 8th time
.
output the next field of id for the Nth time
cycle forever.
No matter how many key=1 are inserted in the middle, the data will be looped.
how to write this PHP, please.
currently found a sequential output sql, but it is not convenient to use
select * from tu_pic order by field (id,9,5,6,7,8) limit 1