Solved

How can I make the key word search results in bold

Posted on 2003-11-20
3
210 Views
Last Modified: 2013-12-24
How can I make the key word search results in bold. Below are my codes..

<cfquery name="Getbusiness" datasource="#DSNName#">
select * from TB_BusinessDev
where (NameOfBusiness LIKE '%#Search#%') OR (TypeOfBusiness LIKE '%#Search#%') OR (Mission LIKE '%#Search#%')
order by BusinessID
</cfquery>

I would like to make the search keyword to be bold or in a different color. Please Help.
0
Comment
Question by:visa1234_12
  • 2
3 Comments
 
LVL 10

Expert Comment

by:Mause
ID: 9790250
Try this:

#replace(NameOfBusiness, Search, '<b>'&Search&'</b>', 'ALL')#

Let me know
Mause

0
 
LVL 6

Accepted Solution

by:
PE_CF_DEV earned 200 total points
ID: 9790658
#rereplacenocase(NameOfBusiness,"(#Search#)", "<B style=""color:black;background-color:##ffff66"">\1</b>", "ALL")#

This will retain the case of the search so if you search for Street street will not be replaced by Street. Also added the highlighting affect.
0
 
LVL 6

Expert Comment

by:PE_CF_DEV
ID: 9860140
any feedback on this?
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now