Re: [Sqlrelay-discussion] SQLRELAY PHP - TRANSACTION COMMIT
Brought to you by:
mused
|
From: Rony C. <coh...@gm...> - 2007-02-05 11:05:08
|
Hi Dave,
This is Mysql Database.
With InnoDB.
I was only able to work fine with it with :
Autocommit : ON
and
Start transaction;
process.......
Commit or Rollback.....
Message: 3
Date: Thu, 18 Jan 2007 09:47:31 -0500
From: David Muse <dav...@fi...>
Subject: Re: [Sqlrelay-discussion] SQLRELAY PHP - TRANSACTION COMMIT
ROLLBACK.
To: Discussion of topics related to SQL Relay
<sql...@li...>
Message-ID:
<116...@ne...>
Content-Type: text/plain
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
|