I figured out the MySql statment, tested it and it works fine. What I am needing is to dump the data that I get, two fields, into a table:
Rank (table 1) Username (table 2)
That simple. Here is the code I have so far:
$sql = "SELECT phpbb_ranks.rank_title, phpbb_users.username FROM phpbb_users LEFT OUTER JOIN phpbb_user_group ON phpbb_user_group.user_id = phpbb_users.user_id JOIN phpbb_ranks on phpbb_ranks.rank_id = phpbb_users.user_rank WHERE phpbb_user_group.group_id = $company ";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain Company Information', '', __LINE__, __FILE__, $sql);
}
$co_members = array();
while ($row = $db->sql_fetchrow($result) )
{
$co_members[] = $row['username'];
// echo " test: $userdata['username'] <br>";
// $username = $group_members['username'];
// echo " test: $result ";
}
I cant seem to figure out how to put the information into a variable and drop them into a table....
I keep getting ARRAY or other odd things.
Any help would be greatly appreciated!
Thank,
Eroc