Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

The Database Forum


You are currently viewing our The Database Forum as a guest. Please register to participate.
Login



Reply
MySQL - Queues - Hold record for user
Old 06-09-2011, 07:44 PM MySQL - Queues - Hold record for user
Yak Yak Yak Yak Yak

Posts: 593
Location: Rochester, MN
Trades: 0
If I have a table containing phone numbers that can be called in a queue. I also have multiple users accessing the records to make calls.

This is the scenario I wish to avoid:
User 1 loads the page, and dials a number.
User 2 loads the page, gets the same record as user 1 and dials the same number.

In that scenario, I would like user 2 to get the next available record.

The solution I came up with is to have a "locked by" field for each record, and when a user accesses the record, it puts their user id in the "locked by" field. That way when another users loads the page, the next available record is loaded, and we don't have multiple users doing the same work.

I should also mention that there are non-calling modules to this system that don't require record locking. So I want to keep individual records "open" to users of other modules, even if the record is "locked" for the calling module.

I hope this makes sense. Is this the best solution to "hold" records for one user in a group, but leave the record open to users in another group?
__________________

Please login or register to view this content. Registration is FREE

Last edited by neorunner; 06-09-2011 at 08:06 PM.. Reason: left out my question... oops.
neorunner is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-09-2011, 07:54 PM Re: MySQL - Queues - Hold record for user
NullPointer's Avatar
Will Code for Food

Posts: 2,815
Name: Matt
Location: Irvine, CA
Trades: 0
So what's the question? The solution you came up with seems to be valid.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
NullPointer is online now
Reply With Quote
View Public Profile Visit NullPointer's homepage!
 
Reply     « Reply to MySQL - Queues - Hold record for user
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.85846 seconds with 12 queries