Time Allocation Issue

From: Date: Mon, 29 Jul 2002 22:04:19 +0000
Subject: Time Allocation Issue
Groups: php.db 
Request: Send a blank email to php-db+get-20875@lists.php.net to get a copy of this message
I'm writing a web application in PHP to do referee scheduling for soccer games. For each game (a single row in a table) I have a cell for referee. The cell stores an integer that I can do a join on with another table of people. I need a way to prevent people from being able to schedule themselves for multiple slots at the same time. (All I care about is start time, for now I'm going to ignore the issue of a game ending after the next one has started.) I have tried doing just a unique index on referee, date, and time but the issue is I use a 0 to indicate that the slot is open. Because of that I don't see a way to do it natively in mysql as such each time I do an insert I think I am going to need to do a select right before to make sure there no conflicts. Is there any better more efficient way to do this? Perhaps natively in mysql. TIA ---------------- Thanks Jefferson Cowart Jeff@cowart.net Support Open Instant Messaging Protocols http://www.petitiononline.com/openIM/petition.html

« previous php.db (#20875) next »