Cold Fusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingCold Fusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old November 11th, 2005, 09:22 AM
careyr69 careyr69 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2005
Posts: 1 careyr69 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 57 sec
Reputation Power: 0
simple question

I have a data base that contains a row or various letters. I want to check and see it a letter is in the row. If it is I want the row to be returned as a result. Right now the code I have is only returning the result if that is the only letter in the column. i.e. if the column is C,V,B,J and I'm searching for C then this is not returned. But if the column is just C and I'm searching for C then it is returned. How do I amend my code to see if the column contains the letter I'm looking for. It doesn't have to be the only letter in the column. Here is what I have...

<cfargument name = "amenities" type = "string" required= "true">
<cfset qualifiedAmenities = ListQualify(amenities,"'")>
SELECT * FROM SingleFamily
WHERE AMEN IN (#PreserveSingleQuotes(qualifiedAmenities)#)

Thank-you for your help

Reply With Quote
  #2  
Old December 20th, 2005, 10:59 PM
sunilaklujkar sunilaklujkar is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2005
Posts: 2 sunilaklujkar User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 40 m 22 sec
Reputation Power: 0
Re: simple question

You can try the following query:
Select * from <table> where AMEN like '%<cfoutput>#qualifiedAmenities#</cfoutput>%'

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingCold Fusion Development > simple question


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap