I’m trying to do a simple select statement on a mysql database. In MsSql it works fine, but I can’t get it to work in MySql.
What I want to do is the following:
Lets say I have a table (named TestTable) like this:
ID | DOMAIN | NrOfVisitors
--------------------------------------------
1 | something.com | 435
--------------------------------------------
2 | blabla.com | 231
And I have a string, like http://bla.ttt.something.com/blabla
Now I want to pass in the string, and select the rows where the domain is in the string.
In MsSQL I can do the following:
SELECT *
FROM TestTable
WHERE "http://bla.ttt.something.com/blabla" LIKE "%" DOMAIN "%"
But in MySql it returns 0 rows. WHat am I doing wrong?
Thanks in advance!
1 Answer