far2slow Posted July 20, 2011 Share Posted July 20, 2011 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'], ) ); Quote Link to comment https://forums.phpfreaks.com/topic/242472-stuck-and-need-a-bit-of-help/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.