If the phpID is similar, a certain number of data entries are written incorrectly. one table is a seat table and one table is a student table.
Seat table:
ID zid userid
Student table:
Userid cityid
Now I want to randomly write the students in the student table into the seat table. the seat table zid is a two-digit seat number.
For example, there are 20 students in the student table, five of which have the same cityid. if five students with the same cityid have to stagger the five digits in the seat table zid, how can this problem be achieved?
A php program used to schedule the exam aims to prevent students with the same cityid from having similar seats.
Thank you!
Reply to discussion (solution)
Which expert will give you guidance? thank you!
If the five digits are staggered, can they be separated by five or more digits, or can they be separated by four digits?
If it is the former, five students with the same cityid cannot appear in the classrooms of 20 students at the same time.
Thank you for your reply. this is just an assumption that the number of students in the classroom may be 100.
Which expert will give you guidance? thank you!