Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7876151
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:07:27+00:00 2026-06-03T03:07:27+00:00

Following on from my last question: I am now using the statement: if (isset($_GET[‘url’]))

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T03:07:28+00:00Added an answer on June 3, 2026 at 3:07 am

    Try making the url /fishing/brown_trout/ instead. Then try something like this:

    if (isset($_GET['url'])) { // "brown_trout"
        $url = str_replace('_', '%', $_GET['url']); // "brown%trout"
    }
    
    SELECT name, url FROM table WHERE species LIKE '%$url%'
    

    This will make the query:

    SELECT name, url FROM table WHERE species LIKE '%brown%trout%'
    

    Which should work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Following from my last question which @Jon Skeet gave me a lot of help
Following on from my last question What is a Stub , I would really
Following up from my last question @ stackoverflow.com/questions/7049245/ I got a couple of answers
Following on from my previous question, Python time to age , I have now
Following from these question Subset sum problem and Sum-subset with a fixed subset size
At the moment I am using the following code: public void init() { question
I'm using VTD-XML to parse some XML files with Xpath expressions, now following showed
Is the following From header incorect? // To send HTML mail, the Content-type header
I'm getting the following from a third party library (one example): @%SystemRoot%\SomePath\SomeFile.Dll,-203 I know
Sometimes I get the following from SQL Server 2005 when executing a stored procedure:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.