[Tickets #1996] Poll block broken for latest poll option

bugs@bugs.horde.org bugs at bugs.horde.org
Thu May 19 02:43:13 PDT 2005


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/?id=1996
-----------------------------------------------------------------------
 Ticket             | 1996
 Updated By         | jason at alteredminds.com
 Summary            | Poll block broken for latest poll option
 Queue              | Scry
 State              | Feedback
 Priority           | 1. Low
 Type               | Bug
 Owners             | 
-----------------------------------------------------------------------


jason at alteredminds.com (2005-05-19 02:43) wrote:

No problem.

These are the log lines from the execution of the Block after I have voted
on the poll.

May 19 10:37:07 wintermute HORDE[9728]: [scry] SQL Query by
Scry_Driver_sql::getPolls(): SELECT * FROM scry_polls LEFT JOIN scry_choices
ON scry_polls.poll_id = scry_choices.poll_id  WHERE poll_enabled = 1 AND
(1116495427 >= poll_start OR poll_start IS NULL) AND (1116495427 < poll_end
OR poll_end IS NULL) LIMIT 1 OFFSET 0 [on line 116 of
"/export/home/jason/html/beta/horde/scry/lib/Driver/sql.php"]
May 19 10:37:07 wintermute HORDE[9728]: [scry] SQL Query by
Scry_Driver_sql::getPolls(): SELECT * FROM scry_polls LEFT JOIN scry_choices
ON scry_polls.poll_id = scry_choices.poll_id  WHERE scry_polls.poll_id = 4
[on line 116 of
"/export/home/jason/html/beta/horde/scry/lib/Driver/sql.php"]
May 19 10:37:07 wintermute HORDE[9728]: [scry] SQL Query by
Scry_Driver_sql::getVotes(): SELECT scry_choices.poll_id, choice_value,
COUNT(vote_id) AS vote_count                           FROM scry_choices
LEFT JOIN scry_votes                           ON scry_choices.choice_id =
scry_votes.choice_id  WHERE scry_votes.vote_confirmation IS NULL AND
scry_choices.poll_id = 4                           GROUP BY
scry_choices.poll_id, scry_choices.choice_value, scry_choices.choice_id     
                     ORDER BY scry_choices.poll_id, vo

The result of the first query is only one line due to the limit directive
being set to 1. Using the patch this limit is upped to the maximum number of
possible poll elements. Thinking about it this is not the most ideal way of
getting all the questions out, but it does work.





More information about the bugs mailing list