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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T19:50:43+00:00 2026-06-11T19:50:43+00:00

I have inserted multiple values from select statement in a single column using implode

  • 0

I have inserted multiple values from select statement in a single column using implode function. Now I want retrieve those values separately for my further queries.
I have a student table in which I am storing their different area of interest in a single column using the implode function implode(‘,’, $_POST[‘aoi’]);. The structure of the table is like this:

id   |  Name   |           AOI
-------------------------------------------
101  | Paul    | Hardware,Networking
102  | Fred    | Finance,Insurance,Banking

Now I want to retrieve this student data separately based on their interest. I tried to extract data using explode function. But it is returning the data in array format.

And I have to extract area of interest separately. Can anybody tell me how to extract the single value from a column containing multiple value. So that I can execute my further queries.

Like $query = “select student.id,student.Name from student where AOI = ‘Insurance'”;

Thanks.

  • 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-11T19:50:44+00:00Added an answer on June 11, 2026 at 7:50 pm

    Your database structure is fundamentally wrong and it will most likely lead to scalability issues further down the line. You should look into the concept of database normalization. In this particular scenario, you should be using a many to many relationship:

    Students:

    id   | name  
    ---------------
    101  | Paul    
    102  | Fred    
    

    StudentInterests

    id   |  student_id  | interest_id
    ---------------------------------
    1    |  101         | 1
    2    |  101         | 2
    3    |  102         | 1
    

    Interests

    id   | interest
    ----------------
    1    | Insurance
    2    | Networkings
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ok, i have a table having multiple values. Now i want to know which
I have inserted this form with multiple checkbox items which collects some values, What
I have inserted string and integer values into dynamic columns in a Cassandra Column
I'm trying to select an element from my webpage... I have inserted a control
I have a SQL query where I want to insert multiple rows in single
i am using a website application for registration, in that application i have inserted
I have created table and inserted values as below. create table mytable (id INT,
I am using C++ and MySQL. I have data objects I want to persist
In my form, there are values to be inserted to multiple tables. After inserting
$results2=mysql_query( SELECT * FROM searchengine WHERE id IN ( . implode(',', $ids) . )

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.