NYCPHP Meetup

NYPHP.org

[nycphp-talk] Highlighting keywords in query

Brent Baisley brent at landover.com
Mon May 19 09:33:07 EDT 2003


Why would you want to do it in the query? Formatting, like color, 
should really be done in the presentation layer. For my purposes I 
create 10 classes in my style sheets so that I can hilight up 10 search 
words in different colors. I then do a search and replace on the words 
so that "dynamics" would be changed to <span 
class="searchword1">dynamics</span>. This won't interfere with any of 
you other formatting or color schemes you have in place.


On Saturday, May 17, 2003, at 11:30 AM, Dennis Butler wrote:

> Let's say I typed in "dynamics" in the keyword field of the form and my
> results were lists of titles such as "Intensity dependence and 
> transient
> dynamics of donor-- acceptor pair recombination in ZnO thin films grown
> on (001) silicon"  I want only the word "dynamics" to be red and the
> rest of the title to be black, is this possible with a MySQL query?
>
-- 
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577




More information about the talk mailing list