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?" ?
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.