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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T18:38:33+00:00 2026-05-10T18:38:33+00:00

I have data from MySQL showing all organisations a customer got, with all details

  • 0

I have data from MySQL showing all organisations a customer got, with all details of employess in each organisation. I want to list each organisation name only once i.e. in a single cell ( row span) and all employees in that organisation against this name like:

Org1     Emp1 Name, Emp1 Phone, Emp1 Address          Emp2 Name, Emp2 Phone, Emp2 Address   Org2     Emp1 Name, Emp1 Phone, Emp1 Address          Emp2 Name, Emp2 Phone, Emp2 Address 

How do I display this data because the number of employess for each organisation is not known in advanced, so I do’nt about setting value of rowspan. Similarly how do I start a row for other organisation? Do I have to write two queries?

Many 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. 2026-05-10T18:38:34+00:00Added an answer on May 10, 2026 at 6:38 pm

    Classic.

    Workaround: only display the name if different than the previous one. You can even not bother about the rowspan (you keep an empty cell).

    $currentOrg = ''; while ($row = mysql_fetch_object($query)) {    if ($row->org != $currentOrg) {       echo '$row->org'.    }    $currentorg = $row->org; } 

    Not the most beautiful but so simple.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When showing data from a mysql table on an php page does it have
I have looped data from mysql, and it's a pretty long list. What's the
I am importing data from MySQL to PowerPivot. I have all of the relevant
I have a mysql table which has data from all flight bookings on my
I have written this query for retrieving data from mysql as below select FeedbackCode,EMailID,FeedbackDetail,
I'm trying to get a certain data from mysql with fetchAll. I currently have
I have some data, yes, data. This data came from a MySQL query and
I have an application that shows data from a MySQL table. Basically, my application
I have a simple php page that displays data from a mysql database. I
Hi i have a small query which takes data from one mysql database and

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.