CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Advanced SQL Question !

Print topic Send  topic

Author Message
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

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.