> I have an application I've written for a pet sitting service. So someone > calls and says they need a pet sit and we take their info and pick a > sitter. > We call that sitter to see if they can take the job, but if they say no, > then we have to change it to a new sitter who can take the job. I want to > keep track of who says yes and who says no and make sure we know who the > active sitter is for each job. > > Does anyone have suggestions of a good way to handle this with the > database > and such?
Well, I assume you have a 'sitter' table and a 'job' table. Each sitter would have an ID and each job would have an ID. You could then add another table that keeps track of who accepts and declines jobs. It would simply store the sitter ID, job ID, and decline/accept. Throw in a little logic to make sure two sitters can't accept the same job and you should be good to go. Hope that helps. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php