Announcement

Collapse
No announcement yet.

Export List of Members of Who've Voted

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

  • Export List of Members of Who've Voted

    I'd like to be able to export a list of those people who've voted in a poll (preferably with their email address already). This will enable me to keep track of who I don't have to keep bugging to vote.

    Possible? Please tell me how.

  • #2
    There is no built-in function to do this. You'd have to write a query to do it, but I'm not sure how to write one that would include the email address.
    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
    Change CKEditor Colors to Match Style (for 4.1.4 and above)

    Steve Machol Photography


    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


    Comment


    • #3
      Originally posted by Landis
      I'd like to be able to export a list of those people who've voted in a poll (preferably with their email address already).
      Try this query...
      Code:
      SELECT
      pollvote.pollid, user.username, user.email
      FROM
      pollvote
      LEFT JOIN
      user
      ON
      user.userid = pollvote.userid
      WHERE
      pollid = [color=red]3[/color]
      ORDER BY
      user.username
      This will enable me to keep track of who I don't have to keep bugging to vote.
      It may be easier for you to find out who didn't vote in a particular poll.
      Code:
      SELECT
      user.username, user.email
      FROM
      user
      LEFT JOIN
      pollvote
      ON
      pollvote.pollid = [color=red]3[/color]
      AND
      user.userid = pollvote.userid
      WHERE
      pollvote.userid IS NULL
      AND
      user.usergroupid = [color=red]2[/color]
      ORDER BY
      user.username
      Change the red bits as necessary.
      Lats...

      Comment


      • #4
        Thanks for the suggestion, I'm quite sure that this would work. However, I don't really know too much how to accomplish what you're suggesting.

        Any resource for a PHP/MySQL newbie to figure out how to get to step one above? Maybe just a quick 'this is how you'd do it'?

        Thanks!

        Comment


        • #5
          There are 2 ways to run the queries, one is via phpmyadmin and the other is from within the vB Admin Control Panel.

          To run from vB, edit the config.php file and find...
          Code:
          // ****** USERS WITH QUERY RUNNING PERMISSIONS ****** 
          // The users specified here will be allowed to run queries from the control panel. 
          // See the above entries for more information on the format. 
          // Please note that the ability to run queries is quite powerful. You may wish 
          // to remove all user IDs from this list for security reasons. 
          $[color=blue]canrunqueries[/color] = '';
          Change that to include your userid, probably 1...
          Code:
          // ****** USERS WITH QUERY RUNNING PERMISSIONS ****** 
          // The users specified here will be allowed to run queries from the control panel. 
          // See the above entries for more information on the format. 
          // Please note that the ability to run queries is quite powerful. You may wish 
          // to remove all user IDs from this list for security reasons. 
          $[color=blue]canrunqueries[/color] = '1';
          Login in to the ACP -> Import & Maintenance -> Execute SQL Query...
          Paste either of the queries into the edit box, and click on continue.

          Done
          Lats...

          Comment


          • #6
            cool!

            very good suggestion and solution!

            Comment


            • #7
              Wow, this looks like it's exactly what I want and I appreciate the hand-holding.

              My userid is 2 (someone else who actually has a clue about php is 1, but no time to help me).

              Final question on this, I hope: where do I access the config.php file to change it to allow me to execute the query?

              Thanks!

              Comment


              • #8
                You should be able to find it at yourdomain.com/forumname/includes/config.php
                Lats...

                Comment

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