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

  • Home
  • SEARCH
  • 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 8588159
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T22:44:34+00:00 2026-06-11T22:44:34+00:00

Table_One id name groupid 1 AAA 5,6 2 BBB 5,7 3 CCC 15 I

  • 0

Table_One

id name groupid
1  AAA   5,6
2  BBB   5,7
3  CCC   15

I am trying to make a query something like:

select * from Table_One 
where Table_One.groupid like '%".$objectData[groupid]."%' 

such that if value of $objectData[groupid] is 5 then result should be

1  AAA   5,6
2  BBB   5,7

Similarly, if value of $objectData[groupid] is 6 then result should be

1  AAA   5,6

and, if value of $objectData[groupid] is 7 then result should be

2  BBB   5,7
  • 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-11T22:44:35+00:00Added an answer on June 11, 2026 at 10:44 pm

    Instead of using LIKE use FIND_IN_SET function, try this:

    SELECT * 
    FROM Table_One 
    WHERE FIND_IN_SET(".$objectData[groupid].", Table_One.groupid); 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

SELECT id,name,SUM(`lsa`) AS lst FROM table_a AS sn, table_b AS fb WHERE sn.uid=fb.uid AND
Using the following query: SELECT pe.prodtree_element_name_l, MAX(rs.resource_value) AS resource_value FROM prodtree_element pe LEFT JOIN
i have a table like this one: -------------------------------- id | name -------------------------------- 1 |
I need to have MySQL query like this one: UPDATE table_name SET 1 =
I have 3 tables like so bug_groups ID NAME DESCRIPTION -------------------------------------- 1 Group1 Some
I would like to get results from two tables grouped by same rules joined
I have 3 tables Links Link ID Link Name GroupID (FK into Groups) SubGroupID
I'm having problems running a query ranking. The inner SELECT gives the rows in
For following tables, I'd like to select all users and their groups for a
I can persist an object into the DB from Java as such: Table Person:

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.