Jump to the post that solved this thread.
Solved: 1 Year ago Use simple_select to get custom profile fields
#2
Solved: 1 Year ago
Well, first I don't think using "IN" clause to get an unique value is optimal.
And this is the case you'd better use write_query than simple_select to extract your datas:
$query = $db->write_query("SELECT u.*, f.fid4 FROM ".TABLE_PREFIX."users u LEFT JOIN ".TABLE_PREFIX."userfields f ON f.ufid=u.uid WHERE u.usergroup=18 ORDER BY u.username ASC");
while($users = $db->fetch_array($query))
{
   $username = build_profile_link(format_name(htmlspecialchars_uni($users['username']), $users['usergroup'], $users['displaygroup']), $users['uid']);
   $ufield = '';
   if ($users['fid4']=='')
   {
      $ufield = '<br />'.$users['fid4'];
   }
   $userlist .= '<tr><td class="'.$altbg.'">'.$username.', '.$users["usertitle"].'<br />'.$ufield.'</td></tr>';
   $altbg = alt_trow();
 }
[MyBB 1.8 mods] - Offer me a coffee
Do not ask me help through PM or Discord
Reply
Jump to the post that solved this thread.


Messages In This Thread
RE: Use simple_select to get custom profile fields - by Crazycat - 2020-09-22, 01:49 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)