search

Home  >  Q&A  >  body text

How to remove all strings after question mark in MySQL query

I have a list of URLs like http://mydomain/app?u=asdfa&b=fnsn with different number of parameters. I want to remove all strings after the question mark and get different urls.

P粉921165181P粉921165181245 days ago365

reply all(1)I'll reply

  • P粉014218124

    P粉0142181242024-03-30 15:06:33

    substring_index(url, '?', 1)

    Will return everything before the first one? Or if not then the entire URL?

    reply
    0
  • Cancelreply