var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Add last record value to current value
My Title isn't that good as I'm not sure how to describe what I want to achieve.
Basically I want to produce a line Chart using data from a MySQL Table.
my Y-axis changes every week and what I'm trying to do is sum as I go the data points. Every week I will add a new value and I want the valy1 to calaculate dynamically.
Example here is my data points for valy
I want to be able to sum them up like below in another column valy1
I found this code for a stored procedure and I can get it to work in Heidi SQL but it doesn't update my table when I run the procedure.
SELECT value, valy,
@valy := CASE WHEN @value = value THEN @valy1 + valy ELSE valy END AS
@value := value
SELECT @valy1 =0,
@value := NULL
I'm not sure even how to CALL this Stored Procedure either. I plan to use jpgraph to populate my chart so I guess I need a while loop to get my chart points.