Announcement

Collapse
No announcement yet.

help constructing a query

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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 14th Jun '07, 1:49pm.
    "I actually ignored at least 20 of your attacks before I ever came back at you." -- Lawrence Cole

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

    Comment


    • #3
      Originally posted by Floris View Post
      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


      • #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


        • #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


          • #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 customization and demonstration site.
            vBulletin 5 Documentation - Updated every Friday. Report issues here.
            vBulletin 5 API - Full / Mobile
            I am not currently available for vB Messenger Chats.

            Comment


            • #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...
              X