Same task from multiple users php

998

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!

562

Answer

Solution:

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.

People are also looking for solutions to the problem: php - Magento: Get min. and max. price for a product (from associated products attributes price configuration)

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.