mySQL (almost finished)
- legokiller666
-
legokiller666
- Member since: Jan. 28, 2001
- Offline.
-
- Forum Stats
- Member
- Level 12
- Blank Slate
Ok i have a page come up (picture below) what do i have to put in the page to make it so there are 2 fields (name + score) i tried the part rigt at the bottem but it bitches about comments... what do i do???
- legokiller666
-
legokiller666
- Member since: Jan. 28, 2001
- Offline.
-
- Forum Stats
- Member
- Level 12
- Blank Slate
- liljim
-
liljim
- Member since: Dec. 16, 1999
- Offline.
-
- Send Private Message
- Browse All Posts (11,644)
- Block
-
- Forum Stats
- Staff
- Level 28
- Blank Slate
At 7/15/01 05:30 AM, legokiller666 wrote: Ok i have a page come up (picture below) what do i have to put in the page to make it so there are 2 fields (name + score) i tried the part rigt at the bottem but it bitches about comments... what do i do???
Box at the bottom for new table: give it a name, "games." Make 3 fields instead of two. click ok. That takes you to a page where you have to fill in the names of the fields and set up their field types.
Field 1 - call it "id" from one of the first pull down boxes, choose the type as "INT". This is short for "Integer." On the right hand side choose "auto increment" from one of the pull down boxes. Also check the "primary key" box.
Field 2 - type in the field name as "name". Choose "Varchar" from the first pull down box. next to that pull down menu, you have to type in the number of characters you'd like to allow... The maximum for Varchar is 255. If the field is the name of a game, I suggest you give it a limit of 100.
Field 3 - call it "score" and from the first pull down box, give it a "INT" type (note that your scores must be stored numerically).
Hit submit.
If you now click "insert" in the table you have just created, put a value into the name column only.... Repeat that. Then click browse. You should see the following sets of data:
id - 1
name - test1
score - 0
id - 2
name - test2
score = 0
Note that the id has been automatically appended?
Now all you have to do is to learn how to update that information with a script that you make :)
- liljim
-
liljim
- Member since: Dec. 16, 1999
- Offline.
-
- Send Private Message
- Browse All Posts (11,644)
- Block
-
- Forum Stats
- Staff
- Level 28
- Blank Slate
You may also consider doing some reading on column types:
- legokiller666
-
legokiller666
- Member since: Jan. 28, 2001
- Offline.
-
- Forum Stats
- Member
- Level 12
- Blank Slate
someone please email me a small script which interacts with mySQL

