View Full Version : get avatar from database
gspot
04-24-2005, 10:33 PM
I'm working on a script trying to get all members avatars from the database. I see that they are being listed and stored through mysql in the table "customavatar" how can I call the images from this database? since they actually do no reside on the server or at least i cant seem to find them. I know how to do sql queries ect, but I need to be able to call members avatars. ANY HELP MUCH APPRECIATED...
Call the image like:
http://www.YourSite.com/forum/image.php?u=USERID (http://www.YourSite.com/forum/image.php?u=USERID&dateline=DATELINE_FROM_DB)
gspot
04-25-2005, 12:37 AM
but if they dont have an avatar how can i make it so it just shows nothing and not a missing image? THX FOR THE HELP TOO
Im trying to make an conditional statement in order to show the avatar for the members who have avatars and for the ones that don't it shows nothing...
When you make your Query use Count(*) for the Selection portion. then you can check if the count is 0 or not with an if statement. If it is 0 show a specific image, otherwise show the avatar.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.