解决方法
试试这个:
$adapter = new Zend\Db\Adapter\Adapter(array( 'driver' => 'pdo','dsn' => 'MysqL:dbname=db;hostname=localhost','username' => 'root','password' => 'password','driver_options' => array( PDO::MysqL_ATTR_INIT_COMMAND => 'SET NAMES \'UTF8\'' ),)); $adapter->getDriver()->getConnection()->beginTransaction();
DB将运行命令:
START TRANSACTION