$othervotes = $db->query_read("SELECT team, rankem_team.teamid, sum(points) AS totalpoints FROM rankem_rank INNER JOIN rankem_team ON rankem_team.teamid = rankem_rank.teamid WHERE rankem_rank.weekid = $week GROUP BY rankem_team.teamid ORDER BY totalpoints DESC LIMIT 25,100"); if ($db->num_rows($othervotes) > 0) { while ($others = $db->fetch_array($othervotes)) { eval('$otherbits .= "' . fetch_template('rank_otherbits') . '";'); } }
Here is what is in the rank_otherbits template
PHP Code:
$others[team] $others[totalpoints],
As you can guess, there is a trailing comma. Is there a template conditional I can use to strip the last comma? If not, how can I do so programatically?