KTBleeding
03-02-2006, 04:34 AM
I'm trying to get the last six members to join my forums to show up on the forum home.. I have the basic idea working now, but for some reason the LIMIT isn't working for me.. It's only returning one result.. AKA the last registered member, rather than the last six.
require_once(DIR . '/includes/functions_user.php');
$newest_members_query = "SELECT userid, username, joindate
FROM " . TABLE_PREFIX . "user
ORDER BY userid DESC
LIMIT 6";
$new_members = $vbulletin->db->query_first($newest_members_query);
if($new_members[userid]){
$new_members[avatarurl] = fetch_avatar_url($new_members[userid]);
if (!$new_members[avatarurl]) {
$new_members[avatarurl] = $stylevar['imgdir_misc'] . '/noavatar.gif';
} else {
$new_members[avatarurl] = $vbulletin->options['bburl'] . '/' . $new_members[avatarurl][0];
}
}
eval('$newest_members .= "' . fetch_template('newest_members') . '";');
Any ideas? I'm stumped. :ermm:
Thanks,
require_once(DIR . '/includes/functions_user.php');
$newest_members_query = "SELECT userid, username, joindate
FROM " . TABLE_PREFIX . "user
ORDER BY userid DESC
LIMIT 6";
$new_members = $vbulletin->db->query_first($newest_members_query);
if($new_members[userid]){
$new_members[avatarurl] = fetch_avatar_url($new_members[userid]);
if (!$new_members[avatarurl]) {
$new_members[avatarurl] = $stylevar['imgdir_misc'] . '/noavatar.gif';
} else {
$new_members[avatarurl] = $vbulletin->options['bburl'] . '/' . $new_members[avatarurl][0];
}
}
eval('$newest_members .= "' . fetch_template('newest_members') . '";');
Any ideas? I'm stumped. :ermm:
Thanks,