BT wrote:

> 
> 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)#>


Not possible for that one because you use NewRanID1 twice. And you have 
the problem that there is no way to guarantee that NewRandID is 8 
characters long so in some cases the left() function will throw an 
error. But if you simple want a random 8 digit number why not use:
<cfset NewRandID = RandRange(10000000,99999999)>

Jochem



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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