Following on from my last question:
I am now using the statement:
if (isset($_GET['url'])) {
$url = $_GET['url'];
}
SELECT name, url FROM table WHERE species LIKE '%$url%'
species could have content likes "Brown & Rainbow Trout, Pike"
however my url for say Brown Trout is : /fishing/browntrout/
This basically prevents the statement above from returning any results.
Clearly it works fine for say : /fishing/pike/ just not for the fish that have 2 names.
Whats the best way to resolve this?
Try making the url
/fishing/brown_trout/instead. Then try something like this:This will make the query:
Which should work.