help constructing a query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • </blunted>
    Member
    • Sep 2002
    • 78
    • 3.8.x

    help constructing a query

    I've added some user profile fields and I would like to list all members of a certain usergroup (additional, not primary group) and their profile fields.

    It's time to send out some premiums for subscriptions. Thanks in advance!

    edit: no wonder I was so confused, I was working on an older version of my dB that didn't have my new custom fields added yet. doh!
    Last edited by </blunted>; Thu 14 Jun '07, 1:49pm.
    "I actually ignored at least 20 of your attacks before I ever came back at you." -- Lawrence Cole
  • Floris
    Senior Member
    • Dec 2001
    • 37767

    #2
    So this is now fixed, or do you still need help with this?

    Comment

    • </blunted>
      Member
      • Sep 2002
      • 78
      • 3.8.x

      #3
      Originally posted by Floris
      So this is now fixed, or do you still need help with this?
      could still use some help
      "I actually ignored at least 20 of your attacks before I ever came back at you." -- Lawrence Cole

      Comment

      • Floris
        Senior Member
        • Dec 2001
        • 37767

        #4
        We can't provide support for custom queries, etc. I also do not quite understand what you're asking.

        Did you check our online manual about custom profile fields and how to use them? http://www.vbulletin.com/docs/html/

        Comment

        • </blunted>
          Member
          • Sep 2002
          • 78
          • 3.8.x

          #5
          sorry. bad description. I have added custom profile fields, and my users have populated them. I want to query by secondary usergroup membership to get username, email, custom profile field(x), custom profile field(y)

          thanks!
          "I actually ignored at least 20 of your attacks before I ever came back at you." -- Lawrence Cole

          Comment

          • Wayne Luke
            vBulletin Technical Support Lead
            • Aug 2000
            • 73978

            #6
            Code:
            SELECT username, email, fieldX, fieldY
            FROM vb_user
            LEFT JOIN vb_userfield ON ( vb_user.userid = vb_userfield.userid ) 
            WHERE membergroupids LIKE '%ZZ%'
            Replace 'vb_' with whatever prefix you have listed in your config.php. Replace X and Y with the field ID of the custom profile fields you want. Replace ZZ with the usergroupid you are looking for.
            Translations provided by Google.

            Wayne Luke
            The Rabid Badger - a vBulletin Cloud demonstration site.
            vBulletin 5 API

            Comment

            • </blunted>
              Member
              • Sep 2002
              • 78
              • 3.8.x

              #7
              I wasn't sure if I needed to specify something special for the secondary usergroup. You've saved me a lot of time, thanks!
              "I actually ignored at least 20 of your attacks before I ever came back at you." -- Lawrence Cole

              Comment

              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
              Working...