• Welcome to Simple Machines Community Forum. Please login or sign up.

Getting Avatar From Database

Started by Smasher, November 25, 2009, 02:57:00 AM

Previous topic - Next topic

Smasher

in my php file I am using the following database query to define $context['game']['members'] but I can not figure out how I am supposed to pull the avatar in....



$dbresult = $smcFunc['db_query']('', "
SELECT
id_member, member_name
FROM {db_prefix}members ORDER BY member_name ASC");
$context['game_members'] = array();
while($row = $smcFunc['db_fetch_assoc']($dbresult))
{
$context['game_members'][] = $row;
}
$smcFunc['db_free_result']($dbresult);



When I say the avatar I am specifically talking about an avatar that would normally be accessed by $context['avatar']['image']

Thank you
Site in Development

Powered by SMF 2.0.4
     - EzPortal 1.0
     - SA Facebook Integration

tyty1234

You can easily get their avatar by loading up their member data using the loadMemberData function.

Try reading this post.
My Activity: Inactive
My Links: tyty1234's SMF Site | SMF Package Parser | SMF Helper | My Mods [5]
Subscribe to my SMF blog for updates
PMs for support will not be accepted, unless requested otherwise.

H

Smasher, do you require any further assistance? :)
-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

Advertisement: