Professional Web Applications Themes

Wanting to restrict search - Coldfusion - Advanced Techniques

I have a page that I use to search through db entries. Some of these entries contain HTML and other HTML-like markup and the contents of the tags is turning up in a search. Is there a way to get the query to ignore this stuff? I have tried a couple of things but have had no luck. Any help with this matter would be greatly appreciated!!...

  1. #1

    Default Wanting to restrict search

    I have a page that I use to search through db entries. Some of these entries
    contain HTML and other HTML-like markup and the contents of the tags is turning
    up in a search. Is there a way to get the query to ignore this stuff? I have
    tried a couple of things but have had no luck. Any help with this matter would
    be greatly appreciated!!

    BimmerBoy Guest

  2. #2

    Default Re: Wanting to restrict search

    Is this a SQL query or a Verity query?
    How is the HTML stored? Is it raw (bad form, old chap) -- ie. <?
    Or HTML encoded? Ie. <

    Here's a general purpose approach that should work:
    A) to just stop the HTML from displaying, strip it from the string using
    REReplace.
    Something like:
    <CFSET sStrippedStr = REReplace (sRawStr, "<.+>", "","ALL")

    B) To weed false search hits, due to tag contents maybe something like the
    following...
    1) query as before.
    2) loop through the query rows, and change the contents to the stripped value,
    as in step A.
    4) Using the original criteria, query the updated query set. That is, run a
    QofQ on the stripped data -- false hits will not be in the final set.

    Consider posting exact examples of what you have, versus what you want.

    Regards,
    -- MikeR


    MikerRoo Guest

Similar Threads

  1. Question 'I've been wanting to go out with you since I read that stuff on the
    By oqaherzceny in forum Operating Systems
    Replies: 0
    Last Post: November 29th, 09:12 AM
  2. I'm wanting to learn Flash
    By cammyt in forum Macromedia Flash Player
    Replies: 2
    Last Post: April 10th, 12:07 AM
  3. Anyone wanting to sell a license
    By jshoot in forum Macromedia Director 3D
    Replies: 0
    Last Post: July 27th, 11:50 PM
  4. Newbie wanting to change label
    By WebNewsUser in forum Macromedia Flash
    Replies: 0
    Last Post: September 19th, 04:42 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139