Useful code snippets: vBulletin

Discussion in 'Community Forum Software' started by Soliloquy, Jun 13, 2013.

  1. Soliloquy

    Soliloquy Regular Member

    Joined:
    Jun 3, 2009
    Messages:
    2,402
    Likes Received:
    66
    Location:
    New York City
    Let's all share our useful PHP or MySQL code snippets for vB! I'll start with some SQL for determining which users set a profile picture but not an avatar:

    Code:
    SELECT username, posts
    FROM vB_user as user
    WHERE user.avatarid = '0' AND
        NOT EXISTS (SELECT * FROM vB_customavatar AS custom WHERE custom.userid = user.userid) AND
        EXISTS (SELECT * FROM vB_customprofilepic AS profile WHERE profile.userid = user.userid)
    ORDER BY username asc
    
     
    WEfail and Brandon like this.

Share This Page