Roddy Dairion
Roddy Dairion

Reputation: 53

How to tell if a query has come to an end

I am building a report using php and mysql, i have multiple queries going on in one go on one page and as you can imagine this is putting a lot of stress on the server, now what i wish to do is get the first query to start and before launching the second query, it checks if the first query has finished and it goes on like this until it reaches the last query. And just to be clear, one query at a time does not put that much stress on the server but several in one go does. If anybody has any idea or has an alternative please let me know.

Upvotes: 0

Views: 244

Answers (1)

Māris Kiseļovs
Māris Kiseļovs

Reputation: 17295

By default, PHP will not execute next MySQL query or any other code at all before previous query is finished.

Upvotes: 1

Related Questions