Jump to content

Recommended Posts

ok i can call my gamer like this but this just gets the one gamer thats logged in

 

global $smcFunc, $scripturl, $user_info;

$request = $smcFunc['db_query']('', '
SELECT gamer
FROM {db_prefix}members
WHERE id_member = {int:user}
LIMIT 1',
array(
	'user' => $user_info['id'],
)
     );
$row = $smcFunc['db_fetch_assoc']($request);
echo'  <div class="centertext"><h1>', $row['gamer'], '</h1></div>';

 

but i want to be able to do it when i have called the members from a group, gamer is not in the database but can be called from the user details

  $query_members = $smcFunc['db_query']('', '
            SELECT
               mem.id_member, mem.id_group, mem.real_name, mem.usertitle, mem.gamer,
               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'],
            )
         );

Link to comment
https://forums.phpfreaks.com/topic/242472-stuck-and-need-a-bit-of-help/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.