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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:14:23+00:00 2026-05-27T00:14:23+00:00

I got stuck with this, I want to select all the fields in 3

  • 0

I got stuck with this, I want to select all the fields in 3 table while using GROUP_CONCAT. What I did is this but it return nothing.

SELECT
    personnel.Task_id AS personnel_Task_id,
    personnel.Top_id AS personnel_Top_id,
    GROUP_CONCAT(personnel.Personnel) AS Personnel,
    project.P_id AS project_P_id,
    project.P_name, project.P_manager, project.POC,
    project.TSD,
    project.TED,
    project.ASD AS project_ASD,
    project.AED AS project_AED,
    project.DT AS project_DT,
    project.DA AS project_DA,
    project.DV AS project_DV,
    task.Task_id AS task_Task_id,
    task.Top_id AS task_Top_id,
    task.Task_name,
    task.Frm,
    task.todate,
    task.ASD AS task_ASD,
    task.AED AS task_AED,
    task.P_id AS task_P_id,
    task.DT AS task_DT,
    task.DA AS task_DA,
    task.DV AS task_DV,
    task.Completion
FROM project_management.task,
     project_management.project,
     project_management.personnel
WHERE personnel.Task_id = task.Task_id
  AND project.P_id = task.P_id
  AND task.Top_id = '$oldID';
  • 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-05-27T00:14:24+00:00Added an answer on May 27, 2026 at 12:14 am

    You need to use GROUP BY for group concat let me give an explanation

    WHEN you use GROUP BY, you need to make all select columns compatible

    it means you cant select a non grouped column.

    You need to use group Aggregate functions at non-grouped columns

    http://dev.mysql.com/doc/refman/5.0/en/group-by-functions.html

    in this example table we cant select id directly

    we can select MAX(id) MIN(id) AVG(id) …

    Example Table

    |-id -|-   Name    -|- Department -|
    |- 1 -|-  Name 1   -|-     1      -|
    |- 2 -|-  Name 2   -|-     1      -|
    |- 3 -|-  Name 3   -|-     1      -|
    |- 4 -|-  Name 4   -|-     2      -|
    

    Query

    SELECT GROUP_CONCAT(Name,DESC SEPARATOR ', ') As Names,Department
    FROM person
    GROUP BY Department
    

    RESULT

    |-id -|-          Names           -|- Department -|
    |- 1 -|-  Name 1, Name 2, Name 3  -|-     1      -|
    |- 2 -|-          Name 4          -|-     1      -|
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing a Web Application and I got stuck at this: I want to
While trying to apply policy-based design, I got stuck on this one (simplified): template
I have this code and I want to keep it elegant. I got stuck
Guys i'm really embaraced to ask for this, but i got stuck and i
I got stuck in this problem for an hour. I am thinking this is
I got stuck with this problem. I wrap two tables inside of a h:form.
I got stuck when chmod a file. At the bottom of this page ,about
I'm stuck with this pretty silly thing; I got a textfile like this; Hello::140.0::Bye
I'm using Lucene.Net in an ASP.NET application on a shared host. Got this stack
I've got this really basic table structure: dbo.tblCategory dbo.tblQuestion (many to one relationship to

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.