sounds like you need a join. Select * from Poll, poll_votes where (Poll.poll_id = poll_votes.poll_id) and (poll_votes.user_ID = WHATEVER);
But I'm still a beginner so.... Respectfully, Ligaya Turmelle ""Anders Gjermshus"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi. > > I'm having trouble with a query. I'm wondering if it is possible at all. > > I'm making a poll for my webpage. I have two tables: > > > > Poll and poll_votes > > > > Table poll contains data about the poll > > Poll_Votes contains all the votes. What I want is to pull out data about the > poll and if the user has voted or not. > > > > I have tried many different queries, but I haven't managed to get it to > work. Can someone help me. > > > > My poll_votes table has this structure: > > Poll_id > > User_id > > Time > > > > I hope someone can help me. > > > > - Anders Gjermshus > > > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]