Tricky Error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • dracolytch@gmail.com

    Tricky Error

    Good day all,
    Ok, I have a pretty tricky problem that I need some help with.

    I pass around search query information a fair amount (specifically
    WHERE statements). Normally, I just rawurlencode() the buggers, and
    pass them via the URL. I like having the where clauses in the URL,
    because then someone can just bookmark the URL, or send it to a friend,
    and I don't have to worry about a thing.

    If someone does a search that requires a LIKE statement, the system
    parses out the terms, and generates the LIKE statement, and passes the
    LIKE statement to the search results page. This works great.

    Almost all of the time.

    Here's where the problem occurs:
    If you search for a NUMBER, and the system uses a LIKE statement, the
    string looks like this:

    data LIKE('%415%')

    Which is great... When I rawurlencode it, I get:

    LIKE%28%27%2541 5%25%27%29

    Looking at it more closely:
    %25 = %
    %27 = '
    %28 = (
    %29 = )

    Which is GREAT... all that makes sense.

    Unfortunately, when I rawurldecode that URL, I get:
    LIKE('A5%')

    It appears to be interpreting the %25 as a %, and then using that % on
    the next two numbers... Ideas?

    ~D

Working...