Answer the question
In order to leave comments, you need to log in
How to select id in turn?
Greetings!
There are several userids, let's say they look like this:
$users = [1,2,3,4,5];
$lastuser = 1;
Answer the question
In order to leave comments, you need to log in
In general, the literal answer
$next = array_search($lastuser,$users)+1;
$user = $users[$next] ?? $users[0];
select manager from users where id > ? order by id limit 1
select manager from users order by id limit 1
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question