I will paste my QUERY below - but what I am trying to do (without any luck so far) is output an active membership listing.
Some members belong to more than one chapter, and instead of showing them twice, I only want their name appearing once (does not matter which chapter affiliation shows...)
What I am trying to avoid is over-inflating my membership by showing duplicates. So if they are in there twice or three times, I am trying to only shoot out their name once. Here is the code.
Any ideas on if this can be done? I cannot find the proper code anywhere. Thank you very much!!
$result = mysql_query("SELECT * FROM members, Users WHERE (members.name = Users.Username AND active like 'Yes') ORDER BY $order",$db);
$number = MYSQL_NUMROWS($result);
$i = 0;
IF ($number == 0) :
PRINT "<CENTER><P>There is nobody that matched your search!</CENTER>";
ELSEIF ($number > 0) :
PRINT "<P>";
ENDIF;
if ($myrow = mysql_fetch_array($result)) {
echo "<table border=0 width=100% cellpadding=2>
<td colspan=6><center>There are $number active members.</center></td></tr>
<tr class=content-title><td><A HREF=$PHP_SELF?order=1>Name</A></td><td>Email</td><td><A HREF=$PHP_SELF?order=2>Chapter</A></td><td><A HREF=$PHP_SELF?order=5>Joined</A></td></tr>\n";
do {
$time = date("m/d/Y", $myrow["joined"]);
printf("<tr class=content-text><td nowrap><a href=profile.php?User=%s target=_new>%s</a></td><td
nowrap><font size=1><a href=mailto:%s>%s</a></font></td><td nowrap>%s</td><tdnowrap>%s</td></tr>\n", $myrow["name"], $myrow["name"], $myrow["Fakeemail"], $myrow["Fakeemail"], $myrow["chapter"], $time);
}
while ($myrow = mysql_fetch_array($result));
echo "</td></tr></table>\n";