Backslash in data/query and like queries help needed

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Craig Stadler

    Backslash in data/query and like queries help needed

    mySQL 4.0.20a WIN32

    Need help with backslash syntax/like queries..

    Query1:
    select * from dbtable1 where Filespec like 'http://www.10291.com/%'
    returns : http://www.10921.com/sikhnet/register.nsf/ram/radioG2/\$File

    Query2:
    select * from dbtable1 where Filespec
    ='http://www.10921.com/sikhnet/register.nsf/ram/radioG2/\$File'
    returns 0 records

    Query3:
    select * from dbtable1 where Filespec like '%\\%';
    returns 0 records

    What am I missing here....?
    Something really strange happens when a record has a backslash in it....
    How is it I can run Query1 and not Query2, Query3...????
    Feel free to also reply via email

    cstadler18@hotm ail.com
    -Craig





  • Craig Stadler

    #2
    Re: Backslash in data/query and like queries help needed

    > select * from dbtable1 where Filespec like 'http://www.10291.com/%'

    Correction (i meant 10921) replaced for security/privacy reasons in original
    message...
    I think you get the idea though...

    -Craig

    "Craig Stadler" <cstadler18@hot mail.com> wrote in message
    news:iczid.2390 588$yk.384563@n ews.easynews.co m...[color=blue]
    > mySQL 4.0.20a WIN32
    >
    > Need help with backslash syntax/like queries..
    >
    > Query1:
    > select * from dbtable1 where Filespec like 'http://www.10291.com/%'
    > returns : http://www.10921.com/sikhnet/register.nsf/ram/radioG2/\$File
    >
    > Query2:
    > select * from dbtable1 where Filespec
    > ='http://www.10921.com/sikhnet/register.nsf/ram/radioG2/\$File'
    > returns 0 records
    >
    > Query3:
    > select * from dbtable1 where Filespec like '%\\%';
    > returns 0 records
    >
    > What am I missing here....?
    > Something really strange happens when a record has a backslash in it....
    > How is it I can run Query1 and not Query2, Query3...????
    > Feel free to also reply via email
    >
    > cstadler18@hotm ail.com
    > -Craig
    >
    >
    >
    >
    >[/color]


    Comment

    Working...