| 1 table minus another!; Heres a pickle for u guys! | |
|---|---|
| Tweet Topic Started: Mar 9 2009, 09:28 AM (295 Views) | |
| PauloMillerz | Mar 9 2009, 09:28 AM Post #1 |
![]()
|
OK next weekend i have a challenge to overcome in my Football project and wondered if you guys had any ideas. I haven't looked it up myself yet, but any advice on where to start looking would be useful ![]() Right. I have a set of data that is continuously updating (Player stats). Every week I am taking a "Screenshot" of that data i.e. how it stands at the end of every week. What I need to do is take week 1 away from week 2, to get the total points obtained in week 2. All this data is stored in mySQL tables within the same database. Any ideas? |
If you like... RATE IT!! Add to my reputation to the left?
| |
![]() |
|
| Darksorrow131 | Mar 9 2009, 11:08 PM Post #2 |
|
How exactly are your tables designed? If you have a record for each week for each player, then it should be relatively straightforward, but maybe your data is stored in some other way that could make things harder
|
|
(let loop () (loop)) ((lambda (x) (x x)) (lambda (x) (x x))) (let ((k #f)) (call/cc (lambda (cc) (set! k cc)) (k)) ((call/cc call/cc) (call/cc call/cc)) -- Infinite loops are awesome! -- Tell me if you have other awesome infinite loops! | |
![]() |
|
| PauloMillerz | Mar 12 2009, 04:07 AM Post #3 |
![]()
|
well each player has an entry in the table, and the table has many data fields... so prob not easy... EDIT: Could I output the data into a cookie.. then pull the data from the cookie into a new table? hmmm Edited by PauloMillerz, Mar 12 2009, 09:27 AM.
|
If you like... RATE IT!! Add to my reputation to the left?
| |
![]() |
|
| Darksorrow131 | Mar 14 2009, 01:35 AM Post #4 |
|
What exactly does the database table look like? |
|
(let loop () (loop)) ((lambda (x) (x x)) (lambda (x) (x x))) (let ((k #f)) (call/cc (lambda (cc) (set! k cc)) (k)) ((call/cc call/cc) (call/cc call/cc)) -- Infinite loops are awesome! -- Tell me if you have other awesome infinite loops! | |
![]() |
|
| PauloMillerz | Mar 15 2009, 06:56 AM Post #5 |
![]()
|
P N C V M G A C P+ P- Y R S B P GK Schwarzer FU 4.6 2520 0 0 25 1 0 0 0 107 7 131 GK Van der Sar MU 6.4 2191 0 0 10 0 0 0 0 55 0 129 GK Cech CH 6 2250 0 0 16 0 0 0 0 63 7 123 Thats the outputted table.. there are 2 of these with the same fields.. This data updates once a week so I need to be able to take table2 away from table1.. to get the difference... |
If you like... RATE IT!! Add to my reputation to the left?
| |
![]() |
|
| Darksorrow131 | Mar 15 2009, 07:33 PM Post #6 |
|
So if I understood correctly, you have a table for each week? The easiest solution would be to make them all into a single table - since the data are of the same form, they shouldn't be in different tables. If for some reason you can't change the table design, then you might be able to do something like this:
where you should substitute "thisweek" and "lastweek" for the real names of your tables. This will fail if a player is missing in one of the tables but not the other for some reason. |
|
(let loop () (loop)) ((lambda (x) (x x)) (lambda (x) (x x))) (let ((k #f)) (call/cc (lambda (cc) (set! k cc)) (k)) ((call/cc call/cc) (call/cc call/cc)) -- Infinite loops are awesome! -- Tell me if you have other awesome infinite loops! | |
![]() |
|
| PauloMillerz | Mar 16 2009, 05:01 AM Post #7 |
![]()
|
Not sure if that would work in my situation.. Putting them into 1 table is not realistic in this situation either... Thanks for the help though.. I found a work around for it at the moment so I will come back to the issue later... |
If you like... RATE IT!! Add to my reputation to the left?
| |
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| « Previous Topic · Web-Based Programming Support · Next Topic » |








10:18 AM Jul 11