All pastes #28509 Raw Edit

Mine

public php v1 · immutable
#28509 ·published 2005-11-13 02:34 UTC
rendered paste body
		$DB->query("create temporary table {$DB->_}membervote_recent (		                unique key stage (member)		           ) select member, max(time) as time from {$DB->_}membervote		             where stage=$this->stage and division=$this->division		             group by member;");		$records = $DB->query(		    "select x.chara as chara, sum(x.weight) as score		     from {$DB->_}membervote as x, {$DB->_}membervote_recent as y		     where x.stage=$this->stage and x.division=$this->division and		           x.member=y.member and x.time=y.time		     group by x.chara;");