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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:18:10+00:00 2026-05-28T01:18:10+00:00

I am trying to join three tables together without any success so far. I

  • 0

I am trying to join three tables together without any success so far. I managed to join two tables together and I am extracting the right data out but as soon as i add in a few more words to my sql statement, no data is being displayed. the code is as follows:

    <?php
$id = $_GET['meeting_id'];

$result = mysql_query("SELECT * FROM Meetings INNER JOIN Minutes ON Meetings.meeting_id = Minutes.meeting_id INNER JOIN attendees ON attendees.meeting_id AND attendees.username WHERE Minutes.approval = 'approved' AND Meetings.meeting_id = '$id'")
or die(mysql_error());

if (mysql_num_rows($result) == 0) {
       echo '<h3>There Arent Any Minutes For This Meeting Yet</h3>';
    } else {

while($info = mysql_fetch_array($result))
{

        echo "<tr>";
        echo "<td><br/>" .'Title: '. $info['title']." </td>";
        echo "<td><br/><br/>" .'Subject: '. $info['subject']. "</td>";
        echo "<td><br/><br/>" .'Next Subject: '. $info['next_subject']."</td>";
        echo "<td><br/><br/>" .'Attendees: '. $info['username']."</td>";


        }
    }
echo "</tr>";
echo "</table>";


?>

my database tables are as follows:

Meetings: meeting_id, title, subject, chairman, secretary, action

Minutes: minute_id, subject, next_subject, approval, meeting_id

attendees: attendees_id, meeting_id, username

anyone….?

  • 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-28T01:18:10+00:00Added an answer on May 28, 2026 at 1:18 am

    The attendees table isn’t being joined correctly.

    SELECT * 
      FROM Meetings 
     INNER JOIN Minutes ON Meetings.meeting_id = Minutes.meeting_id 
     INNER JOIN attendees ON Meetings.meeting_id = attendees.meeting_id 
     WHERE Minutes.approval = 'approved' 
       AND Meetings.meeting_id = '$id'
    

    Your SQL will only return meetings that have attendees and minutes. If a meeting doesn’t have these then change the INNER JOIN statements to LEFT JOIN.

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

Sidebar

Related Questions

I am trying to join three tables together but having a problem getting the
I am trying to join two tables together, but have an odd requirement. Normally
I have the following three tables. I am trying to inter link (join) among
I'm trying to join multiple tables together for building a report. The report lists
I have been trying to join two tables (USERS AND USERS_ROLES) based on their
I have three tables that I need to join together and get a combination
I'm trying to join some tables together in MySQL, but I seem to get
I have two tables I need to join together and I'm unsure how to
I am having a problem trying to JOIN across a total of three tables:
I have a MySQL Left Join problem. I have three tables which I'm trying

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.