Thursday 15 August 2013

mysql - SQL query is not retrieving all the fields -


I have tables in my database, the first one (participants) looks like this:

Enter image details here

And I have one more vote in which I can vote anyway I'm participant

Enter image details here

So my problem is that I am trying to get all the votes of each participant, but when I execute my query, only four lines are ordered by the number of votes, and the rest are not showing in my query:

  select COUNT (difference `vote` .``````````````````````), AC gate_ID, participants. Join 'Votes' on `Vote' as the partner_name of the name 'participant'. Participant_ID` = `Participants` Votes according to votes PaperSipent_ID ORDER Papercissue_id dessc   

Recovers:

Enter image details here </ P> </ div> <p> <div class =

I think the problem is that you can vote.participant_id , Instead of participants.id , which limits you to participating voters, despite external participants . Check

No comments:

Post a Comment