search

Home  >  Q&A  >  body text

php+mysql downloads data in a loop based on ID, each time next

For example, the table content is

id name

1 a

2 b

3 c

4 d

th The first download id is 1

The first download id is 2

The first download id is 3

The first download id is 4

## After #id is 4, it starts from 1 again and keeps looping indefinitely. It must be able to support high concurrency!

Before I used to save the id in another table, every time
。。。。。。。。1859 days ago1167

reply all(3)I'll reply

  • junwind

    junwind2020-01-14 17:19:49

    First sort in forward order and download one round, until the last id, then reverse sort and download one round, until the last id, and then in forward order, and continue indefinitely

    reply
    0
  • 。。。。

    How to design the database?

    。。。。 · 2020-01-14 17:20:47
  • 。。。。

    。。。。2020-01-06 22:15:48

    The first download id is 1

    The second download id is 2

    The third download id is 3

    The fourth download id is 4

    reply
    0
  • Cancelreply