MySQL help

Discussion in 'Programming' started by tim987, Jul 21, 2009.

  1. #1
    my friend would like to know the answer to this question:

    "if i have a website using php and mysql where the first person to click on a particular button wins a prize, what happens if 10 people click on the button at the exact same time including milliseconds? how does php/mysql pick who clicked the button first?"

    ?
     
    tim987, Jul 21, 2009 IP
  2. stOK

    stOK Active Member

    Messages:
    114
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #2
    You cant tell in advance. Depends on internal serialization of requests.
    And one more thing: even if all requests arrive at the same millisecond inside the kernel events will be dispatched in sequence.
     
    stOK, Jul 22, 2009 IP