I'm trying to make a search script that reads through the database entries for a Search String. I have the following:
$result = @("SELECT ID FROM Table Where $Type like \"%$SearchString%\"", $link);
This works fine, only when I search for 'LAN', it will retrieve entries with 'plane' in them.
I can use:
$result = @("SELECT ID FROM Table Where $Type like \"% $SearchString %\"", $link);
to remedy this, but then if I search for an entry that only contains 'LAN' it will not show it. How can I fix this?
Thanks