?
Solved

How can I make the key word search results in bold

Posted on 2003-11-20
3
Medium Priority
?
218 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 800 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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

770 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