View Full Version : ***Problem Displaying Full Name Not Table ID***

01-23-2010, 02:22 PM
Hey. i have a small problem i think you guys might be able to help me out with. i'm trying to call up the name of the chairperson and secretary of all the meets stored within my database at the moment is is only one meeting. i have an occurrences table, with the two fields chairperson and secretary which relate to the staff table filed named staff_id.

The problem is when i call up chairperson or secretary from the database to display i get there staff_id example 1, 2 etc.. but i need to display there full name. but i can't seem to find out for the life of me what to do. can you help?

Any more information needed please let me know?? thanks


$result = "SELECT * FROM web_meeting
LEFT JOIN web_occurrences ON web_meeting.occurrence_id =web_occurrences.occurrence_id";

$result = mysql_query ($result) or die (mysql_error());
while($row = mysql_fetch_assoc($result))
$meetings .= '
<div class="meeting png_bg">
<b>Terms of reference:</b> '.$row['reference'].' <br />
<b>Chairman:</b> '.$row['chairperson'].' - <b>Secretary:</b> '.$row['secretary'].' <br />
<b>Booked:</b> '.$row['date'].'<br />
<a herf="#">View Apologies</a> | <a herf="#">View Details</a> | <a herf="#">View Members (2)</a>
</div> <br />


01-23-2010, 04:08 PM
Please show the table schema of all tables involved. Most likely you want to perform an INNER JOIN, not a LEFT (OUTER) JOIN, but if we can see your tables it would be helpful.

01-23-2010, 04:31 PM
According to the same post on phpfreaks this has been solved... :rolleyes: