- Timestamp:
- 2006/12/11 14:03:52 (20 years ago)
- Location:
- temp/test-xoops.ec-cube.net/html/modules/xoopspoll
- Files:
-
- 2 edited
-
blocks/xoopspoll.php (modified) (1 diff)
-
class/xoopspolloption.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
temp/test-xoops.ec-cube.net/html/modules/xoopspoll/blocks/xoopspoll.php
r405 r678 37 37 $block['lang_results'] = _PL_RESULTS; 38 38 for ($i = 0; $i < $count; $i++) { 39 $options_arr =& XoopsPollOption::getAllByPollId($polls[$i]->getVar('poll_id') );39 $options_arr =& XoopsPollOption::getAllByPollId($polls[$i]->getVar('poll_id'), 3); 40 40 $option_type = 'radio'; 41 41 $option_name = 'option_id'; -
temp/test-xoops.ec-cube.net/html/modules/xoopspoll/class/xoopspolloption.php
r677 r678 106 106 107 107 // public static 108 function &getAllByPollId($poll_id )108 function &getAllByPollId($poll_id, $limit = 10) 109 109 { 110 110 $db =& Database::getInstance(); 111 111 $ret = array(); 112 $sql = "SELECT * FROM ".$db->prefix("xoopspoll_option")." WHERE poll_id=".intval($poll_id)." ORDER BY option_count DESC LIMIT 0, 10";112 $sql = "SELECT * FROM ".$db->prefix("xoopspoll_option")." WHERE poll_id=".intval($poll_id)." ORDER BY option_count DESC LIMIT 0, $limit"; 113 113 $result = $db->query($sql); 114 114 while ( $myrow = $db->fetchArray($result) ) {
Note: See TracChangeset
for help on using the changeset viewer.
