If any query failed inside a transaction then PDO will not issue a
rollback, It will left the decision on you that you want to ignore the
failed query it or want a rollback.
You can find the examples of handing of query failure inside a transaction
at http://www.php.net/manual/en/pdo.transactio
Incorrect, MySQLs MyISAM engine is non transactional, the InnoDB engine /
BDB egines both support transactions
Bastien
From: Koen Wagemans <[EMAIL PROTECTED]>
To: Bastien Koert <[EMAIL PROTECTED]>
CC: [EMAIL PROTECTED], php-db@lists.php.net
Subject: Re: [PHP-DB] transactions
On Tuesday 08 November 2005 09:37, Koen Wagemans wrote:
> MySQL isn't a transactional DB it doesn't know rollback and commit.
MySQL does support transactions so long as you use a reasonably recent version
and InnoDB tables.
However as Bastien suggested a transaction can't persist beyond the exec
Hello
MySQL isn't a transactional DB it doesn't know rollback and commit.
You can solve the problem probably by locking the tables (LOCK / UNLOCK)
Regards
Koen
On 07/11/05, Bastien Koert <[EMAIL PROTECTED]> wrote:
> I don't think you can. Once the script finishes the connections are closed
>
I don't think you can. Once the script finishes the connections are closed
and the transactions completed. What are you trying to do where you need to
have the transaction across multiple pages? Perhaps, if you are gathering
the data across the pages, you could use a session to store the data un
I had that suspicion that I was only calling it for
the last query. Thank you for confirming and for the
code!
Much appreciated.
Stuart
--- Graham Cossey <[EMAIL PROTECTED]> wrote:
> Stuart, you are calling your rollback function only
> if $result is false.
>
> This check you are performing at
Stuart, you are calling your rollback function only if $result is false.
This check you are performing at the end of performing your 3 queries, each
of which update $result. The net result here is that you will only call
rollback() if the 3rd query results in false.
I would create another functio
See Interspersed:
--- Martín Marqués <[EMAIL PROTECTED]> wrote:
> I was tryiong to generate a validation that would
> fail with certain inserts
> (or modification of a register). Using more then 25
> characters in the second
> field would yield the same result.
Got that and yes, for my pages ,
El Sáb 16 Oct 2004 11:36, Stuart Felenstein escribió:
> I think you are adding a conditonal /validaton
> statement as the constraint ? More then x characters
> will generate an error.
I was tryiong to generate a validation that would fail with certain inserts
(or modification of a register). Usin
I think you are adding a conditonal /validaton
statement as the constraint ? More then x characters
will generate an error.
My understaning is an error in mysql transaction will
rollback should rollback the entire set of
transactions.
error handling for each statement- values will be
coming from
El Sáb 16 Oct 2004 09:52, Stuart Felenstein escribió:
> My statements are all working but I'm not sure if
> things are set up correctly. I say this because at
> one point the first $query failed, yet the rest of
> inserts wre committed. Now I believe I need to set
> autocommit to 0 , yet the quer
How did you know I was using INNOdb tables ? :)
So here is one question, that I can't seem to find a
good answer on.
So the first table, where the first insert must go
looks like this:
[MainTable]
+--+--++
| Record_ID (auto inc int) | Member ID| ...|
+
Paul Dubois wrote:
>
>> Does the script go from start to finish even though the connection to
>> the browser has been severed. I.e. The script will run complete even
>> if there is output to the browser as the script is running?
>
>
> Not necessarily. It won't base its actions on what the br
At 12:52 +0900 9/1/02, Jean-Christian Imbeault wrote:
>Paul Dubois wrote:
>>
> >
>>>I am worried that if I use persistent connections it might be
>>>possible for more than one PHP script to be inside the same
>>>transaction at the same time.
>>
>>
>>Not at the *same* time, because although a pe
Paul Dubois wrote:
>
>
>> I am worried that if I use persistent connections it might be possible
>> for more than one PHP script to be inside the same transaction at the
>> same time.
>
>
> Not at the *same* time, because although a persistent connect might be
> used by more than one script,
At 17:46 +0900 8/31/02, Jean-Christian Imbeault wrote:
>I'm a little confused/worried about database transactions,
>persistent connections and PHP.
>
>I am worried that if I use persistent connections it might be
>possible for more than one PHP script to be inside the same
>transaction at the s
Hello, "Marko Perich"!
You wrote:
> I need to make a transaction over several pages and
> commit it after
> validating the last one.
Insert line on the first page, update on next, mark as
commited on the last. Each hour drop uncommited lines. You
may also provide current time of transaction s
The likest solution for you problem seems to be session. Start a
session on the first page. On the next page validate every
variable and if all went ok, bind it to the current session.
Don't forget to make a page counter so no one can jump easily
from page one to four. After your last form action
18 matches
Mail list logo