[eluser]bgreene[/eluser]
I'd do it with a stored procedure because it lets the db do all the work. But you might not be familiar with stored procs. It would be something like
<code>
DECLARE crnt CURSOR FOR
SELECT movie_id,...// fields you need // FROM movie_quicktakes WHERE movie_id = $movie_id ORDER BY helpful_percent DESC";
OPEN crnt;
SET nomore = 0;
WHILE nomore = 0 DO
FETCH crnt INTO idx,...// set of predefined variables corresponding to fields in the select// ;
// calculate your fiddle factor for the crnt row
UPDATE movie_quicktakes SET helpful_percent = fiddlefactor WHERE id = idx
END WHILE;
</code>