(Code1)
if($sname=='1')
$strWhere .= " and (place like '%UN Building%' or place like '%Manhattan%')";
Above code calls every registered person whose office is in "UN Building"
or "Manhattan"
Since UN Building is one of major buildings in Manhattan, it has independent in address.
Let's suppose there is another district called "Manhattan" in Oregon.
If someone who lives in Manhattan, Origon registered,
the above code will call every man whose office is in "UN building"
or Manhattan, New York. but also unexpectedly " tha man whose office is in Manhattan, Oregon.
So, I have to change the code as follow;
(Code2)
if($sname=='1')
$strWhere .= " and (place like '%UN Building%' or place like '%Manhattan%' and place like '%New York%')";
The Code2 modified by me doesn't work, it's just a show of my intention.
I want to call every registered person whose office is in "UN Building" + "Manhattan, New York"(not Manhattan, Oregon).
You may think I can solve this problem with next code.
(Code3)
if($sname=='1')
$strWhere .= " and (place like '%UN Building%' or place like '%Manhattan, New York%')";
But the way of writing an address is very not strict in my country.
So, they write like this "Manhattan blah blah blah New York".
but the Key words "Manhattan" and "New York" is surely included.
that is the reason why I want the Code4 that can work.