#1
  1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2003
    Location
    Barcelona
    Posts
    295
    Rep Power
    76

    On-line theater booking system


    Hi all,

    I am finishing a system for booking seats for a theater.

    Most of the work is already done but now I have to find out a way for, after havind selected the seats, I can wait for some 5 minutes for the credit card charge. If after 5 minutes the user have not bought his reservation, the seat must become available again.

    To be honest I don't think I can do this with SLEEP. My only way would be to set up a cron job every 10 minutes to check for purchases not ended.

    But I am pretty sure you can suggest me something more efficient and smart.

    Can you help me?
    Pere
    www.casti2001.com
  2. #2
  3. Sarcky
    Devshed Supreme Being (6500+ posts)

    Join Date
    Oct 2006
    Location
    Pennsylvania, USA
    Posts
    10,692
    Rep Power
    6351
    mark the tickets as "pending" in the database with a timestamp 5 minutes into the future from the user's last activity. Don't display tickets which are "pending" and their pending expiry date hasn't passed.

    Comments on this post

    • sir_drinxalot agrees
    HEY! YOU! Read the New User Guide and Forum Rules

    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

    "The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

    Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.

IMN logo majestic logo threadwatch logo seochat tools logo