Wanting to restrict search

Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  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. Similar Questions and Discussions

    1. I'm wanting to learn Flash
      Where can I get good beginner tutorials for using flash? Thanks
    2. wanting an extra 0.5 inch margin when printing
      Acrobat prints great to the printer. and i just found that there is a checkbox that let's you select "print as image"... when it is not checked,...
    3. Anyone wanting to sell a license
      If anyone is interested in selling a license for Director (8.5+), please contact me off list to doscuss it. So far i've been cycling through trial...
    4. Newbie wanting to change label
      Hi ! I'm new in flash. What i need is a label that displays the current year and when pressed it links to a url like:...
    5. AI10.03 Question with a blend wanting to export to PD
      I want to export a large blend to Photoshop. I don't know if flattening will affect the color. Would there be any difference if it was Rasterized...
  3. #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

Posting Permissions

  • You may not post new threads
  • You may 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