Jump to content

stuck and need a bit of help


far2slow

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

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.