Community Member Profile

Lyle
Member since Feb 3, 2009

Recent Blog Comments By Lyle

  • Ask Ben: Selecting Random Values Without Repetition In ColdFusion

    Posted on Feb 4, 2009 at 2:51 AM

    Hi Brandon, Does that take care of duplicate selections? It seems like you would have a chance of grabbing the first element of the complete list with each loop iteration. With a List (MyList) and a desire of 4 randomized values (ToValue), you could alter the array code to: <... read more »

  • Ask Ben: Selecting Random Values Without Repetition In ColdFusion

    Posted on Feb 3, 2009 at 5:49 PM

    For this guy, it should be done on the database side. In SQL Server, you add ORDER BY NewID() This blog has a run down of a host of random ordering options in different databases: http://www.carlj.ca/2007/12/16/selecting-random-records-with-sql/ If you have an Array, MyArray, a... read more »

Member Account Kinky Solutions Shop
  • Help Wanted - Find Your Next ColdFusion Job
InVision App - Prototyping Made Beautiful With Prototyping Tools