I am trying the following mysql function, which includes a while loop.
BEGIN SET @total := 5000; SET @count := 1; SET @total := (SELECT price from ite