Hi I'm new to this forum and relatively new to PHP / SQL.

My question is, in general, does SQL with PHP cause any race conditions?

eg. If a user navigates to a page that executes some SQL such as logging in /registering to a site, the server runs that script right? What would happen if two, three, or even a hundred people are all trying to register at the same time? If the server is halfway through one of the scripts, would the next user interrupt this and cause the server to execute it from the start?

How do large sites usually handle logins / register scripts to avoid this? I know about threads but afaik PHP doesn't allow multiple threads.



Thanks for reading.