我做多更新一PDO::exec
命令做高管時,是活躍:我得到2014不能執行查詢,而其他無緩衝的查詢與PDO
$MyPdo->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY,true);
$MyPdo->exec("update t1 set f1=1;update t2 set f1=2");
我做它在事務中,我不斷收到以下錯誤:
SQLSTATE[HY000]: 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.
只有這些查詢/ IES
謝謝,這是我目前所做的,我需要找到是否有一種方法來保持查詢,因爲他們現在。 – 2009-11-25 15:59:48