Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8474997
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T17:46:37+00:00 2026-06-10T17:46:37+00:00

When visitor votes, I store information answer_id , ip , etc. My website visitors

  • 0

When visitor votes, I store information answer_id, ip, etc.

My website visitors vote in multiple polls.

I want to know visitors who vote for example ( answer_id (767) ) on what else they vote for. Based on ip. lets say answer_id=767

Table: poll_stat

`id` int(11) NOT NULL auto_increment,
`question_id` int(11) NOT NULL,
`answer_id` int(11) NOT NULL,
`ip` varchar(255) NOT NULL,
`date` date NOT NULL,
`country` text NOT NULL,
`time` int(11) NOT NULL,
`age` int(11) NOT NULL,
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T17:46:38+00:00Added an answer on June 10, 2026 at 5:46 pm

    I think this will work for you.

    select ip, question_id
    from poll_stat
    where ip in (select ip from poll_stat where answer_id = 767 group by ip)
    and answer_id <> 767
    

    edit

    Hmm…you might check that there is an INDEX created on the ip column. If that isn’t it, perhaps it doesn’t like the IN clause. I will rewrite as a join:

    select ip, question_id
    from poll_stat ps1
    inner join (select ip from poll_stat where answer_id = 767 group by ip) ps2
    on ps1.ip = ps2.ip
    where answer_id <> 767
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Redirecting a visitor who hits http://example.com to http:// www .example.com isn't terribly difficult. But
Quick sum up: I have a social website where users can follow/post/vote etc. I
For my website I want a track visitor system I found this one HERE
How can I gather the visitor's time zone information? I need both: the time
I need to know if a visitor of my page has clicked the 'Like'
I am doing a voting system on my website. Visitors do not need to
In the visitor pattern , i want the client to only have access to
Is navigator.buildID unique for each visitor (I want to use it to keep track
I want to expand a declared Visitor through inheritance and have the run-time environment
I know what Visitor Pattern is and how to use it; this question is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.