ksbrace 0 Newbie Poster

Ok, so I have 2 tables sales_ppl and potential_clients. I want to assign the clients to the sales people in a round robin fashion to distribute them more evenly by state, etc.. like one client gets assigned to the first salesp_name, the second client ot the second salesp_name, third to the third. then, assuming I only have 3 sales people, the 4th should go back to the first, 5th to the second and all the say through the group

There is salesp_name (sales person's name) that is also in the potential_clients that links the two together.

In potential_clients, I have client_group column. When I get a new group of potential clients, they are assigned a group number and initially they are all assigned to 'HOUSE' as the salesp_name (sales person's name). so I want to assign X where salesp_name='HOUSE' and client_group='BMX234' one by one within the potential_clients table.

Thanks in advance for any and all help/advice/etc.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.