A
A
Alexey2015-10-22 21:29:46
MySQL
Alexey, 2015-10-22 21:29:46

What is the best way to organize a script with a return of a unique value to the stream?

We have a table with more than 100,000 rows:
Color|Modification
We make a request to the
localhost/init.php?id=lada
localhost/init.php?id=citroen script
so that when requesting with the lada ID, the first row from the color modification table is taken, and when requested again, this one was taken already the second, and so on (that is, the lines, as I understand it, should be marked), and when requested by citroen, the first line is taken again, and so on, but the line will never be returned with the same ID again. How to do it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrew, 2015-10-22
@R0dger

In Limit requests to be used?
At the 1st request, we check if we have data in the array, if not .. we take the first line, then we already check if we have data in the array, then we take the rest .. something like this ... and remember the current Limit. www.mysqltutorial.org/mysql-limit.aspx _

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question