binary_dreamer Posted August 2, 2006 Share Posted August 2, 2006 hi. i got a task to do, and i have to use [u][b]LAMP[/b][/u]. I am slightly confused on the way it has to get implemented. all i need is some guidance (not the code). here is the problem.i got a database of 60 users with their contact details, and there is an extra column that is manually assigned a letter A, B, or C to the user. Depending on which area is coming from, it gets a letter. A for North, Bfor east, and C for south. week 1:Mon to Friday each day is gonna have one person from team ASaturday and Sunday each day is gonna have one person from team B and one from C.week 2:Mon to Friday each day is gonna have one person from team BSaturday and Sunday each day is gonna have one person from team A and one from C.week 3Mon to Friday each day is gonna have one person from team CSaturday and Sunday each day is gonna have one person from team A and one from B. and the story continues. have in mind that i do not want a user from a team to appear twice, unless everybody from its team have done the job. for example user A1 cannot appear again unless all users A1-A20 have not done their job.any ideas? ??? Quote Link to comment Share on other sites More sharing options...
zq29 Posted August 2, 2006 Share Posted August 2, 2006 One option could be to create a 'count' field in your table. Every time a user is assigned to a 'job' increment their count, when selecting a user for a 'job', order the results by the 'count' field and select the user with the lowest count. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.