Re: [Sqlrelay-discussion] SQLRELAY PHP - TRANSACTION COMMIT ROLLBACK.
Brought to you by:
mused
|
From: David M. <dav...@fi...> - 2007-01-18 14:47:09
|
What database are you using? Does it support rollback?
If so, some databases (like postgresql) require that you use a BEGIN
query to begin a transaction and then end the transaction with a COMMIT
or ROLLBACK, but if you don't BEGIN then all queries are committed
automatically.
Some other database interfaces do the BEGIN for you, but SQL Relay
requires that you do the BEGIN yourself.
Dave
On Thu, 2007-01-18 at 11:15 +0100, Rony Cohen wrote:
> Hello,
>
> I'm using SQLRELAY with PHP.
>
> I meet problems when I want Rollback.
> That doesn't work at all....
>
> I put :
>
> SqlrelayClass::ConnexionBDD();
> sqlrcon_autoCommitOff(SqlrelayClass::$dbConn);
>
> try{
> ... somes send queries .....
>
>
> // I PUT AN EXCEPTION HERE....
> throw new MyException("error");
>
>
> SqlrelayClass::commit();
> SqlrelayClass::EndSessionBDD();
>
> }
>
> catch(MyException $ActionErr){
>
> // MY ROLLBACK
> sqlrcon_rollback(SqlrelayClass::$dbConn);
>
> }
>
> SqlrelayClass::CloseConnexionBDD();
>
>
>
> I do that, but all my queries still work, and are register in my
> DataBASE.
>
> Can someone Tell my WHY ..??
> THANK YOU FOR THE HELP.
> Rony
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________ Sqlrelay-discussion mailing list Sql...@li... https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion
|