MyBB Community Forums

Full Version: looking for plugin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm looking for a plugin that shows referred users in the referrer's profile.

understand?

thanks,
carey
This plugin should do the trick.


see below.
Why are you doing the same query twice ? =P
	$query = $db->query("SELECT * FROM ".TABLE_PREFIX."users WHERE referrer='".$mybb->input['uid']."'");
	$showrefer_count = $db->num_rows($query);
	$query = $db->query("SELECT username,uid FROM ".TABLE_PREFIX."users WHERE referrer='".$mybb->input['uid']."'");
LeX- Wrote:Why are you doing the same query twice ? =P
	$query = $db->query("SELECT * FROM ".TABLE_PREFIX."users WHERE referrer='".$mybb->input['uid']."'");
	$showrefer_count = $db->num_rows($query);
	$query = $db->query("SELECT username,uid FROM ".TABLE_PREFIX."users WHERE referrer='".$mybb->input['uid']."'");

Oh shoot..

Thanks for catching that. That was for debugging :

below....
Just a notice =P You can always use the "build_profile_link" function for displaying a memprofile Wink
And for displaying ( now = name1,name2, ) would be looking "better" if its "name1,name2" but that's my opinion =P

		$sep = "";
		while($referral = $db->fetch_array($query))
		{
			$showrefer_referrals .= $sep.build_profile_link($referral['username'], $referral['uid']);
			$sep = ", ";
		}
Hmm wow. Thanks for the tip. Didn't know such functions existed =o

[attachment=6486]