MySQL Forums
Forum List  »  Newbie

Re: SUM problem.
Posted by: Patric Andersson
Date: March 15, 2009 07:54AM

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.

Options: ReplyQuote


Subject
Written By
Posted
March 12, 2009 03:29AM
March 12, 2009 09:52AM
March 13, 2009 07:10PM
March 13, 2009 11:10PM
March 14, 2009 04:01PM
March 14, 2009 06:40PM
Re: SUM problem.
March 15, 2009 07:54AM
March 15, 2009 10:41AM
March 15, 2009 10:35PM
March 16, 2009 09:33AM
March 16, 2009 09:52AM
March 16, 2009 02:46PM
March 16, 2009 04:15PM
March 17, 2009 02:11PM
March 17, 2009 05:03PM
March 17, 2009 06:31PM
March 17, 2009 10:17PM
March 18, 2009 06:03AM
March 15, 2009 05:41PM
March 15, 2009 07:14PM
March 16, 2009 08:34AM
March 18, 2009 12:52AM
March 21, 2009 05:58AM
March 21, 2009 11:13AM
March 22, 2009 05:01PM


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.