MySQL Forums
Forum List  »  PHP

Re: Calculation with row value
Posted by: Peter van Hanegem
Date: December 15, 2014 03:23AM

The table is already populated.

ID BAND STAGE DURATION
1 Band1 1 30
2 Band2 2 40
3 Band3 3 30
4 Band4 2 40
5 Band5 1 30
6 Band6 2 40
7 Band7 3 30
8 Band8 2 40
9 Band9 1 30
10 Band10 2 40
11 Band11 3 30
12 Band12 2 40
13 Band13 1 30
14 Band14 2 40
15 Band15 3 30
16 Band16 2 40
17 Band17 1 30
18 Band18 2 40
19 Band19 3 30
20 Band20 2 40
21 Band21 1 30
22 Band22 2 40
23 Band23 3 30
24 Band24 2 40
25 Band25 1 60

Starttime of band1 = 13:00:00. There a NO events/bands playing at the same time.

What do i want as output

ID - Begintime - band - Stage - duration - endtime

So every time the has to be a calculation Begintime = endtime previous row, endtime = Begintime + duration.

On a different page i will be able to change the duration,stage, band.

So i need help with the select and the calculation.

The whole thing is to help us plan the day by having a blockschedule, filled with fictive names. Then when names of bands come available, filling them in and also the duration, not all bands are playing the same amount of time. And the we can see where we have place to put other bands and so one

Options: ReplyQuote


Subject
Written By
Posted
December 09, 2014 01:44PM
December 09, 2014 05:57PM
December 10, 2014 12:55PM
December 10, 2014 05:17PM
December 11, 2014 11:13AM
Re: Calculation with row value
December 15, 2014 03:23AM
December 15, 2014 04:56PM
January 14, 2015 01:15PM
December 10, 2014 09:35PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.