yes the pollid will match the forumid, which should make it easier to pull the correct data
--------------- Added [DATE]1215446827[/DATE] at [TIME]1215446827[/TIME] ---------------
tried the COUNT method, still no joy
--------------- Added [DATE]1215446986[/DATE] at [TIME]1215446986[/TIME] ---------------
the closest I've come is below,
Code:
$num=1;
while ( $retail2 = $db->fetch_array($retail)) {
if ($num == 0) {
$num=0;
} else {
$retail2['title'] = fetch_censored_text($retail2['title']);
$retail2['forumid'] = fetch_censored_text($retail2['forumid']);
$voters = fetch_censored_text($retail2['voters']);
$voterssave = $voters;
$total = 0;
}
if ($voters > 1) {
$votechoice = fetch_censored_text($retail2['voteoption']);
$total = $total + $votechoice;
$voters--;
$num=0;
} else {
$pollpercentage = ($total * 100 / $voterssave) / 10;
$num=1;
eval('$retail3 .= "' . fetch_template('Template') . '";');
}
}
This calculates the first poll (excluding the final poll vote) and then skips the other forums.