|
Posted by Jerry Stuckle on 09/14/07 11:57
Pugi! wrote:
> I am using PDO for my MySQL database connection and actions.
> I was wondering if it is possible to test if your are in a
> transaction.
> ...
> start transaction
> ...
>
> call a function, can I test in this function if I am in the middle of
> a transaction or not ?
>
> ...
> end transaction
> ...
>
> thanx,
>
> Pugi!
>
Pugi,
No, there isn't any PDO (or other, for that matter) call I know of which
allows you to test if you are in a transaction or not. Probably because
there isn't any SQL query to do it.
But you also need to remember - MySQL will ignore transactions if you're
using MyISAM tables. So even if you could make such a call, it might
return incorrect information.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|