I am having issues with the following code of mysql when using the "not like" mysql command. My snippet looks like this
$name = something
$sql = "Select * from table1 where table1.field1 not like ' $name ' ";
What it should look like in phpmyadmin is
Select * from table1 where table1.field1 not like %something%
But I am not sure on how to put in the percentage signs. I have tried this with no success
$sql = "Select * from table1 where table1.field1 not like /%' $name'/% ";
Is there any method for putting in the percentage wildcard??
Thanks in advance
Where Are My Sports