I need to select a field content by its first letter. The following works :

<cfquery name="data" dbtype="query">
   select * from session.usersData
   <cfif isDefined('url.alpha')>
      where username LIKE 'a%'
   </cfif>
   order by #sortKey# #sortOrder#       
</cfquery>

using var 'url.alpha' returns nothing and no error:

<cfquery name="data" dbtype="query">
   select * from session.usersData
   <cfif isDefined('url.alpha')>
      where username LIKE '#url.alpha#%'
   </cfif>
   order by #sortKey# #sortOrder#       
</cfquery>

Please advise. TIA 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:3364
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to