You are here: OCIRollback problem « PHP Programming Language « IT news, forums, messages
OCIRollback problem

Posted by juicy on 11/02/66 11:41

I want to do rollback from insert data into master-details table when there
are duplicate ID key in by user. The algorithm is like this

1. insert data into master_table
2. loop
3. select count(*) from detail where ID = <ID key in by user>
4. if count(*) > 0{ $dup = true;}//end if
5. insert data into detail_table
6. End loop
7. If $dup = true{OCIRollback($conn);}
else{OCICommit($conn);}

if there are two duplicate row inserted into detail_table, it should
rollback all transaction but I found that it won't work and still insert
on record to it.

Please advise on this problem, thanks.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация