Skip to content

Instantly share code, notes, and snippets.

Created November 12, 2015 07:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/b578b9ed6253e3f3a089 to your computer and use it in GitHub Desktop.
Save anonymous/b578b9ed6253e3f3a089 to your computer and use it in GitHub Desktop.
TryCF Gist
<cfscript>
people = QueryNew( "name,dob,hash", "varchar,date,varchar", [
[ "Susi", CreateDate( 1970, 1, 1 ), 'ABC' ],
[ "Urs" , CreateDate( 1995, 1, 1 ), '##ABC' ],
[ "Fred", CreateDate( 1960, 1, 1 ), 'EFG' ],
[ "Jim" , CreateDate( 1988, 1, 1 ), '##EFG' ]
]);
Dump( var=people, label="people - origional query" );
people2 = people.filter(function(row,rowNumber,recordset){
return ( Left(row.hash, 1) != '##');
});
Dump( var=people2, label="people - without hash code" );
</cfscript>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment