How about:
<cfscript>
        newrandid = left(RandRange(1,1000000) & RandRange(1,1000000) &
RandRange(1,1000000),8);
writeOutput(newrandid);
</cfscript>

you should also consider making use of cfscript when you're doing more
than three or so cfsets.  

-----Original Message-----
From: BT [mailto:[EMAIL PROTECTED]] 
Sent: Monday, July 30, 2001 4:54 PM
To: CF-Talk
Subject: Function all together?





Anyone know how to do this is one line?



 <cfset newRanID1 = #RandRange(1,1000000)#>
 <cfset newRanID2 = #RandRange(1,1000000)#>
 <cfset NewRandID = '#newRanID1##newRanID2##newRanID1#'>
 <cfset NewRandID = #left(newrandid,8)#>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to