My current query (doesn\'t work)
SELECT url FROM table WHERE \'http://www.longurl.com/some/string\' like \'%\' . url . \'%\'
table
What about this:
SELECT url FROM table WHERE url LIKE '%longurl.com%string%'
or, to be just like your PHP:
SELECT url FROM table WHERE url LIKE '%longurl.com%'