Reputation: 37
Let's say there are two users trying to obtain the same information from a database. I red somewhere that in some languages this can be handled with something named threads, the result being time efficiency.
What is the best practice for solving this problem in PHP.
Thanks!
Upvotes: 0
Views: 65
Reputation: 17750
Reading (or obtaining) the information doesn't create a problem anyway. A problem will arise when two users will try to edit the same information at the same time.
In your case, you don't need to do anything - the webserver will take care of everything.
Moreover, there are no threads in PHP, assuming you want to "use" threads, what you can do is create a job queue, which is again, unnecessary in this case.
Upvotes: 4