Okay, heres the situation:
I'm trying to create a Dynamic Forum Avatar (I believe VB had those).
The first version is going to be requested by the used ID, unless you guys can help me fully integrate it into SMF.
So $_GET gets the user ID, and retrieves memberName and prints it on the avatar.
What I need help with, is the correct MYSQL query needed to retrieve the info from the database.
Thanks in advance! ;)
SELECT IFNULL(realName, memberName) AS name FROM {$db_prefix}members WHERE ID_MEMBER = '$_GET[id]';
That's the basic query - the IFNULL part is important - it will pull the display name if it's set, otherwise it pulls their user name. Make sure you take the basic security precautions such as ensuring that the id is set and that it's an integer.
Thanks dude! I'll try it asap.