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 9134795
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:43:32+00:00 2026-06-17T08:43:32+00:00

I have multiple ID’s in a single field like this field_name +———-+ 12345|34456|43564 Now

  • 0

I have multiple ID’s in a single field like this

field_name
+----------+
12345|34456|43564

Now what I wanted is to get the row if it matches even a single number perfectly so I searched a little and I found this and used it in my query but it failed

SELECT field_name FROM tbl_name WHERE field_name REGEXP '[[:<:]]34456[[:>:]]';

So I used this a back-slash and it worked,

SELECT field_name FROM tbl_name WHERE field_name REGEXP '[[:<:]]34456\[[:>:]]';

so is it perfect or I am going wrong somewhere? I need an exact match, I don’t want that that am hunting for 34456 and if 34457 is there and it takes that, I want EXACT match, and I can’t use WHERE here

  • 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-17T08:43:32+00:00Added an answer on June 17, 2026 at 8:43 am

    Well, no solution is going to be “perfect” if you store ids like that 🙂

    MySQL has a function called FIND_IN_SET that can be useful for this type of task, but it assumes your list is comma-delimited. So you’ll need to replace the pipes with commas in order to use that function.

    Something like this should work:

    SELECT field_name 
    FROM tbl_name 
    WHERE find_in_set('34456',replace(field_name,'|',',')) > 0;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have multiple strings like st1, st2, st3, st4, st5, st6, st7. now i
I have multiple options like this : <li> <a href=# title= class=selected><span class=to-admin>Administrator</span></a> <input
I have multiple containers like this <div class=container> <span> <!-- Inside the span is
I have multiple plone sites in one zope instance (ZODB). Now I'd like to
I have multiple websites run on single database. My question related table Structure is
I have multiple classes with many associations linking them together and I would like
I have multiple (between 40 and 50) MP3 files that I'd like to concatenate
I have multiple charts in one page but I am getting this error when
I have multiple buttons that are using a single command with a command parameter
I have multiple input fields on one page. Each input field have a text

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.