Karl, ----- Original Message ----- From: ""karl "" <[EMAIL PROTECTED]> Newsgroups: mailing.database.mysql Sent: Sunday, July 14, 2002 7:41 AM Subject: Updates
> Hello, > This is similar to my post earlier...(I'm really racking my brains over this). > I'm going to try and rephrase (shorten) my question: > > I've created a database that multiple users can search from. The results that USER1 returns must be unique even if USER2 uses the exact same lookup. So, I'm trying to put a "HOLD" on a record(s) that each USER is looking at, I'm trying to use TABLEB for indicating whos looking at what (who has a hold on certain records). > > I'm really hoping there is an efficient SQL approach to this, I'm trying to avoid using script to step painlessly through the tables record for record to apply HOLDS on records. if you use InnoDB type tables, you can do you searches inside a transaction (wrap the transaction in BEGIN ... COMMIT) with: SELECT ... FOR UPDATE That sets exclusive row level locks on each index record the SELECT looks at. You may want to tune innodb_lock_wait_timeout in my.cnf if the transactions last long. > Any good ideas? > > Karl Best regards, Heikki Tuuri Innobase Oy --- InnoDB - transactions, row level locking, and foreign key support for MySQL See http://www.innodb.com, download MySQL-Max from http://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