I have a table of users updated everyday – I want to get every 160th user.
I know I need to do a count to see if there are above 160 or 320 users so then I can take that user out but how would this formula work?
Do I divide the count of users by 160?
But how do I know whether its the 160th or 320th user is need?
This check is going to happen after every user signs up, so once the user is added to the db I need to see if they are a multiple of 160 then send them an email basically (db users can go over 165000).
There is a simple way in knowing if the user is 160th.
This will validate if user is dividable by 160 with no decimals.
More info about modulo : http://www.dotnetperls.com/modulo