Jump to content

array help needed


far2slow

Recommended Posts

ok i want to put this

 

 $request = $smcFunc['db_query']('', '
SELECT gamer_xbgt
FROM {db_prefix}members
WHERE id_member = {int:user}
LIMIT 1',
array(
	'user' => $user_info['id'],
)
);

$row1 = $smcFunc['db_fetch_assoc']($request);

 

 

into this so it calls the gamer_xbgt for each member

 

      $query_members = $smcFunc['db_query']('', '
            SELECT
               mem.id_member, mem.id_group, mem.real_name, mem.usertitle,
               IFNULL(lo.log_time, 0) AS is_online,
               IFNULL(a.id_attach, 0) AS id_attach, a.filename, a.attachment_type
            FROM {db_prefix}members AS mem
               LEFT JOIN {db_prefix}log_online AS lo ON (lo.id_member = mem.id_member)
               LEFT JOIN {db_prefix}attachments AS a ON (a.id_member = mem.id_member)
            WHERE mem.id_group = {int:id_group} ' . (!empty($modSettings['team_additional_groups']) ? 'OR FIND_IN_SET({int:id_group}, mem.additional_groups)' : '') . '
            ORDER BY mem.real_name ASC',
            array(
               'id_group' => $row['id_group'],
            )
         );
      }
  

      // Looping through the members.
      while ($profile = $smcFunc['db_fetch_assoc']($query_members))
      {
      
            $context['display_groups'][$row['place']][$row['id_group']]['members'][$type][] = array(
            'id' => $profile['id_member'],
            'group_id' => $profile['id_group'],
            'name' => '<span style="color: ' . $row['online_color'] . ';">' . $profile['real_name'] . '</span>',
            'colorless_name' => $profile['real_name'],
		'href' => $scripturl . '?action=profile;u=' . $profile['id_member'],
            'link' => '<a href="' . $scripturl . '?action=profile;u=' . $profile['id_member'] . '"><span style="color: ' . $row['online_color'] .             ';">' . $profile['real_name'] . '</span></a>',
            'title' => $profile['usertitle'],
            'online' => array(
               'label' => $txt[$profile['is_online'] ? 'online' : 'offline'],
                $txt[$profile['is_online'] ? 'online' : 'offline'] . '</a>',
                  'image_href' => $settings['images_url'] . '/' . ($profile['is_online'] ? 'useron' : 'useroff') . '.gif',
            ),
         );

 

 

Link to comment
https://forums.phpfreaks.com/topic/242541-array-help-needed/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.