Hello. I'm new to the group and needing help. I have a work to do that requires to assign a requested user one record to be filled with missing information. The problem is that the table holding data will be filled with about 300 people at one moment and about a 30 - 60 seconds between each save/request new record for every user. I'm doign this with php and mysql extension (one instruction at same time for server restrictions) and I have no idea how to work with transactions, to block the table until the next available record is been assigned and other user don't have the chance to assign it to itself.
I was thinking to do it calling a procedure i made (like "CALL NEXT_AVAILABLE()"), and then do a select to find which one record is effectively assigned and ready with user an status fields, like "SELECT * FROM `table` WHERE `user` = # AND `status` = 'READY'. Or with a function "SELECT * FROM `table` WHERE `id` = NEXT_AVAILABLE ()". --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "mysql" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/mysql -~----------~----~----~----~------~----~------~--~---
