ttgive / qeephp

Automatically exported from code.google.com/p/qeephp
0 stars 0 forks source link

数据库操作失败时抛出异常 #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
以前为了兼容 PHP4,数据库操作失败时是返回 
false,现在则改为抛出异常。

不过抛出异常需要修改事务机制,以便在异常抛出后,事务��
�够正确回滚。

Original issue reported on code.google.com by dualf...@gmail.com on 19 Jul 2007 at 6:09

GoogleCodeExporter commented 9 years ago

Original comment by dualf...@gmail.com on 29 Jul 2007 at 7:18

GoogleCodeExporter commented 9 years ago
新的事务机制使用对象封装一个事务,因此即便抛出异常,��
�要事务对象被销毁,就会自动回滚

Original comment by dualf...@gmail.com on 29 Jul 2007 at 7:23

GoogleCodeExporter commented 9 years ago
只有数据库操作失败才会导致事务对象自动回滚,否则将自��
�提交。

Original comment by dualf...@gmail.com on 14 Feb 2008 at 3:41