Jump to content

algorithm of the program.


binary_dreamer

Recommended Posts

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 A
Saturday 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 B
Saturday and Sunday  each day is gonna have one person from team A and one from C.
week 3
Mon to Friday each day is gonna have one person from team C
Saturday 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?  ???
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.