Hello I have a system where users are able to buy tickets to shows etc.
Right now I use the MyISAM as tabletype but I would like to try InnoDB to make safe transactions. For the moment I use a TABLE LOCK to make sure that the same ticket isn't sold twise. One of the table consists on these 3 fields: (order_id, show_id, seat_id) So a normal script does this: Lock tables select to see if the tickets is already sold insert new sold ticket if no one is already there unlock Obviously I don't want another user to insert a new ticket just after if checked but right before current user inserts. Now - how would I do this with InnoDB to make it safe? Best regards Morten (now pass the maillist filter; sql, mysql, query) --------------------------------------------------------------------- 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