Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ColdFusion / Advanced Techniques / September 2006



Tip: Looking for answers? Try searching our database.

Execute Query before Session Ends

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
amswebmaster - 29 Sep 2006 22:11 GMT
Hello,
I am working on an applicationt that is basically a virtual lineup to book
appointments.  Basically, users log in and are presented with the next
available time slot from the database.  They can either confirm the time or log
out.  When they confirm the time, the time is then marked as "taken" in the
database..

"times table"
slot_id
date
time
taken (bit)
offered (bit)

I realized yesterday that if Person A logged in and was offered time_slot = 1,
then if person B logged in before person A finished registering (confirm) then
Person B would also be offered time_slot = 1.  To overcome this, I created the
"offered" field.  Basically, as soon as a time is offered, the "offered" field
turns from 0 to 1.  So now, when Person A logs in, the time they are offered is
set to "1" and when person B logs in, they are given the next available time
that is not "offered" or "taken".  

I hope you are following.

What I am having trouble doing now is the following...
If person A logs in, is offered a time_slot and that time_slot becomes marked
"offered"...when they logout or close the window the time_slot remains marked
as "offered" i.e. "offered = 1".  I am trying to figure out a way to
automatically change the specific time_slot's "offered" field back to 0 in the
case that it is not confirmed.  Does this make any sense?  
Please help,
Thank you.
Scott Stroz - 30 Sep 2006 02:37 GMT
If you are using CF7, you can use Application.cfc and specify the necessary code in the onSessoinEnd method.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.