Compare Two Strings in MySQL

前端 未结 7 1686
走了就别回头了
走了就别回头了 2021-01-15 17:36

My current query (doesn\'t work)

SELECT url
FROM table
WHERE
    \'http://www.longurl.com/some/string\' like \'%\' . url . \'%\'

table

相关标签:
7条回答
  • 2021-01-15 18:23

    Try removing or escaping some of the characters in your URL string. OR omitting the http: part .. I believe the : could be confusing the parser ...

    so try   %//longurl.com/%
    

    or even

    %longurl.com%  if possible
    

    or even

    http://longurl.com/%
    
    0 讨论(0)
提交回复
热议问题