Skip to content

Commit

Permalink
Only join status and votes of the same session ID
Browse files Browse the repository at this point in the history
Closes #245.
  • Loading branch information
waldoj committed Feb 16, 2018
1 parent 320cdd4 commit cfd5157
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion htdocs/vote.php
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,8 @@ function drawChart() {
FROM bills_status
LEFT JOIN votes
ON bills_status.lis_vote_id = votes.lis_id
WHERE bills_status.bill_id = '.$bill['id'].'
WHERE bills_status.bill_id = ' . $bill['id'] . '
AND (votes.session_id=bills_status.session_id OR votes.session_id IS NULL)
ORDER BY date_raw DESC, bills_status.id DESC';
$result = mysql_query($sql);
if (mysql_num_rows($result) > 0)
Expand Down

0 comments on commit cfd5157

Please sign in to comment.