Home > Backend Development > PHP Tutorial > There is a problem with pdo when php executes a transaction, transaction pdo_PHP tutorial

There is a problem with pdo when php executes a transaction, transaction pdo_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-13 10:11:26
Original
1204 people have browsed it

PHP has a problem with pdo when executing transactions. Transaction pdo

The new version of pdo will have this problem:

General error: 2014 Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute.' in. . .

It means either using fetchAll() or using the attribute MYSQL_ATTR_USE_BUFFERED_QUERY. The former does not want to use it because it is worried about occupying memory, and the latter finds it has no effect.

 <span>$this</span>->db->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, <span>true</span>);
Copy after login

Reference blog:

http://www.flashj.cn/wp/pdo-transaction-err-in-php.html

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/929485.htmlTechArticlephp There is a problem with pdo when executing a transaction. Transaction pdo The new version of pdo will have this problem: General error: 2014 Cannot execute queries while other unbuffered queries are active. Cons...
Related labels:
pdo
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Database pdo connection problem
From 1970-01-01 08:00:00
0
0
0
pdo installation
From 1970-01-01 08:00:00
0
0
0
$pdo->exec($sql);Why does it always return false?
From 1970-01-01 08:00:00
0
0
0
PHP PDO predefined constants
From 1970-01-01 08:00:00
0
0
0
PDO query data error
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template