On Saturday 04 January 2003 11:45, Clyde wrote: > Using MySql with InnoDB files you can lock rows for update. > Eg select * from customer where cusomerID=1 for update > > I assume these locks are release when the the records selected are actually > updated (or the connection is terminated). But how do you release these > record locks if you do not want to go ahead with the update. > > Scenario: > > User selects records to update. > User changes mind (clicks on cancel button) > > Now we have locked rows that need to be unlocked.
Use COMMIT/ROLLBACK. they release all locks that were set in the current transaction. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php