A
A
Alexander2020-09-03 01:25:27
PHP
Alexander, 2020-09-03 01:25:27

How to get data from select during transaction?

Goodnight. How to get data from select during a transaction in pdo (or how to clear the buffer, if I understand correctly)?

When I make a transaction from update/insert/delete, everything works, but it's worth adding a select - php gives an error "General error: 2014 Cannot execute queries while other unbuffered queries are active". As far as I understand, in order to continue the execution of a transaction after a SELECT, you must first unload the data. How to do it?

I would be grateful if you could tell me both options (pdo, pure sql)

ps Irrelevant. I overstayed yesterday. I woke up this morning and the issue resolved itself.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
FanatPHP, 2020-09-03
@Sentim

Usually, just like always.
Your question has nothing to do with transactions. But only to the way you fulfill requests.
It is not necessary to try to push all requests in one. Requests must be made individually. And there will be no errors.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question