Re: SUM problem.
I used myphp to create the tables, but I'll print every insert statement I have to show, this time however I won't translate the variables inside the statements but translate it afterwards.
If this isn't enough, let me know what more information you need or if I need to post all of my horrible code :P
Let's start with the adduser.php
INSERT INTO lepok_anvandare
(fornamn, efternamn, email, nick, telefon, mobil, ort)
VALUES
('$fornamn', '$efternamn', '$email', '$nick', '$telefon', '$mobil', '$ort')
Ok, this is for :
lepok_users
(firstname, lastname, email, nick, telephonenr, mobilephonenr, city)
Ok, then lets continue with addtorney.php
INSERT INTO lepok_turneringar
(namn, datum, typ)
VALUES
('$namn', '$datum', '$typ')
Ok might be selfexplainable but here's the translation for :
lepok_torneys
(name, date, type)
Let's continue to editresult.php
INSERT INTO lepok_resultat
(turnering, deltagare)
VALUES
('$turid', '$leftbox')
And translation for lepok_result
(torney, user) - To explain this, all this is done in html forms, so for a admin to add a player to a torney it will show all the users in the database in a leftbox, and can be moved to the rightbox if they played in the torney, there is allso a DELETE FROM if a user is moved from the rightbox to the leftbox. (Hope that made sence once again)
And allso in editresult.php I have this.
UPDATE lepok_resultat
SET
poang=$poang, pengar=$pengar
WHERE
id=$resultatID
And another translate for lepok_result
poang = points (the score in the torney)
pengar = money (if the user won any money in the torney)
And here is where I store the actual score for each user in selected torney.