Hi Tom, ----- Original Message ----- From: "Tom Beidler" <[EMAIL PROTECTED]>
> I have a database of sites for a grounds maintenance company. I want to flag > sites for service. Each site has a service order, 1-875. I want to keep 25 > sites flagged for service. Once a technician works on a site and posts a > service report, I set that sites flag to 'no' and would like to flag the > next one in line to 'yes'. Not a direct answer to your question, but just thinking of another way to make your system work and also circumvent the issue with service order # wrapping. How about you store a "date of last service" for each site, that is updated when a technician has visited a site? Then you can always select the sites with the 25 oldest dates (ORDER BY last_service_date LIMIT 25) without the need for trickery with flags. Of course you'll need some safeguards, but that applies to the other method too. Regards, Arjen. -- MySQL Training Worldwide, http://www.mysql.com/training/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Mr. Arjen G. Lentz <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Technical Writer /_/ /_/\_, /___/\___\_\___/ Brisbane, QLD Australia <___/ www.mysql.com --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php