RE: [PHP-DB] Re: Hold System
Hi, Thank you, Peter and all. This has been of great help. Regards, Justin Palmer -Original Message- From: Peter Westergaard [mailto:[EMAIL PROTECTED] Sent: Thursday, July 15, 2004 6:48 AM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Re: Hold System In the example of Bob, Mary and Barbara that I gave in my last post. If Bob cancels his hold and I reset date_held for mary to the current date, so that she has adiquite time to place her student. If I do that this will put Barbara into the #1 position because she has now put a hold before Mary. With this beig the case, would the best solution be to recursively go through the others holding the student(Mary and Barbara), and set Mary's date_held to now, and Barabara's date_held to a minute after (a time which has most likely has not occurred yet) Mary's. I'd simply go by your date_created (and I'm assuming that's a timestamp of some kind with minute or second granularity). Leave that to the time the record was created. Then, by definition, the #1 position is always: SELECT * FROM hold_tracker WHERE STUDENT_ID = {whatever} AND valid = 1 ORDER BY date_created ASC LIMIT 0,1 No need to update anybody's record except Bob's (when it is expired or cancelled), and Mary's (to indicate when her time window opens). Barbara's record shouldn't need any sort of touching whatsoever. No touchy! Unless you meant date_created to be the date they created the firm booking, not the date they placed the request for a hold. In which case you might substitute 'id', since it will number everything sequentially by order of receipt anyhow. -P -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Re: Hold System
I guess I'm still not grasping... Who creates the temporary I'm-trying-to-place-you link between coordinator and student? The system automatically, or the coordinator manually? What is a #1 position? How does a student get there? Who or what places them there? How do they leave that position? -P -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Re: Hold System
You basically have the idea: -Students are matched to Host Families (We have Students, but we do not have Host Families) -It does not matter how many holds a Coordinator has. They can have zero. It is to there discretion. -Coordinators pick students to place. It is fairly involved. But I have the rest worked out. I just don't feel right about this hold table. Justin Palmer -Original Message- From: Ed Lazor [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 14, 2004 12:42 PM To: 'Peter Westergaard'; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Re: Hold System Hold refers to the period of time when a student is waiting to be matched with a host family. - You have three groups: students, coordinators, and host families. - Coordinators match students with host families. - Students go through different stages of processing. The goals are to: - provide each host family with a student - keep each coordinator busy with three students - make sure each student has a coordinator - make sure students don't get stuck indefinitely in any particular stage Basically, this can end up being a fairly involved project... -Original Message- Could I get a plain-language explanation of the process of a 'hold'? I'm not entirely clear what is happening, and what an 'expiry' means in the context of the hold and what a '#1 position' would represent for a student. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Re: Hold System
Hi, A 'hold' is a time period in which a Coordinator has to place the specific student with a Host Family. Coordinators can hold a specific student for up to 48 hours. At which time the student must be placed with a host family with in that time period. Or the coordinator has canceled the hold within that time period. Or if the time period passes the hold is automatically canceled so that the next coordintor holding the student can have there chance to place the student with the Host Family. That is the key to the small project. In my current table schema the USER_ID represents the Coordinator. The STUDENT_ID represents the Student. There is no need to worry about Host Families at all. I hope this helps. Let me know if it makes more sense. Justin Palmer -Original Message- From: Peter Westergaard [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 14, 2004 12:28 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Re: Hold System Could I get a plain-language explanation of the process of a 'hold'? I'm not entirely clear what is happening, and what an 'expiry' means in the context of the hold and what a '#1 position' would represent for a student. -P -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php