I'm trying to calculate a running total in the query I'm doing with
DBIx::Class, similar to what is described here:

http://stackoverflow.com/questions/664700/calculate-a-running-total-in-mysql

So basically I'll need to run this command just before running a query
to get a resultset:

SET @runtot := 0;
SELECT profit, (@runtot := @runtot + profit) AS rt FROM table;

How can I have that "SET @runtot := 0;" execute just before the SELECT
statement when I call the resultset method?

Dave

_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk

Reply via email to