query.from( "users" )
.select( "name" )
.where( "id", "=", { value = arguments.id, cfsqltype = "varchar" } )
.unionAll( function( q ) {
q.from( "users" )
.select( "name" )
.where( "id", "=", { value = arguments.id, cfsqltype = "varchar" } );
} );
This should work correct? When I call this, Whoops tells me Element ID is undefined in ARGUMENTS.
But only within the .unionAll the first .where is passed the argument.