Hey...

I have a question. I need to be able to try to perform a database update,
but if it doesn't succeed, I need to be able to rollback the changes, and to
inform the user that the changes didn't succeed.

I've looked at the MySql site, and can see somewhat how the Commit/RollBack
functions work. However, I'm not sure how to create the required PHP code to
implement this kind of process...

Basically I need to:

        Create query...
        Perform Update on the table(s)
        Perform my check(s)
        If the checks fail
                alert user
                rollback updates
        else
                success

It's my understanding that I need to somehow set "START TRANSACTION" prior
to beginning the update. But I'm not sure how to do that within the PHP
code... Nor am I sure if there's something else I need to do...

Any examples/hints/sample code will be appreciated. Thanks for any
assistance!

Regards,

Bruce
[EMAIL PROTECTED]
(925) 866-2790



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to