thomas
|
| Posted: 03/02/2002, 1:03 AM |
|
Hi,
my SQL-String looks for an address which is free for the next telephone contact. It works fine but in case that two agents press the submit time at the same time they got the both the same address. So my question is how can i prevent that ? Iam using PHP with Mysql and thats my SQL-String.
thanks thomas
$flds_address_id1 = dlookup("addresses","address_id"," activbit = 0 AND locked = 0 AND last_result <> 'finished' AND (last_assign_to = '" .$UserID ."' OR last_assign_to = '9999') AND ((last_wv_date = curdate() AND last_wv_time <= curtime()) OR last_wv_date < curdate()) ORDER BY last_assign_to,prio,touch,last_wv_date,last_wv_time ASC LIMIT 1");
|
|
|
 |
thomas
|
| Posted: 03/03/2002, 1:25 AM |
|
Is it possible to get an array of for example 10 addresses and than make an shuffle on it with the random function ?
thomas
|
|
|
 |
|