Jump to content

Creating mysql table ( phpmyadmin )


Rommeo

Recommended Posts

Hi

 

i m new about php programming and mysql. i m trying to build a simple membership system. And i created a table using phpmyadmin which have 8 fields like ;

 

memberid || nickname || name || surname || adress || mail || password || dateadded

 

i have set the values of these ( varchar / int etc.  ). then my problem starts here.. i have no idea about other things.. So my questions are ;

 

1- Should i have to change the attributes ? ( to my language for ex ? ) ( i think this is the place that is asking us in what language we will save data. am i correct ? Why do we use this thing then ? )

 

2- and another section that wants me to select " unsigned / unsigned zerofill.. etc " again should i have to change here ? and where do we use these ?

 

3- "Nulll Section ".. a section that wants me to select "null" or "not null" ? What is this for ? Should i change ?

 

4-  For me This is the hardest question i have to ask. Cause i really could not find enough information ( in my language and in english ) about this section that wants me to set values to " primary " / " index " / " unique " and the " default " ..What are these values for ? Where do we use these ?

 

 

i ll be glad if you can answer any of these questions.

Thanx in advance.

Link to comment
Share on other sites

primary key ->is your unique key or field

unique -> unique, if you enter same data it will be invalid

index -> set the unique index of your table

zerofill-> if you enter 1 and your length is 10 then it will fill up the remaining space with 0

null -> you can enter null or empty value in your db

not null -> required if you dont put anything then thats invalid

 

 

- Should i have to change the attributes ? ( to my language for ex ? ) ( i think this is the place that is asking us in what language we will save data. am i correct ? Why do we use this thing then ? )

 

tha q is not clear ???

Link to comment
Share on other sites

primary key ->is your unique key or field

unique -> unique, if you enter same data it will be invalid

index -> set the unique index of your table

zerofill-> if you enter 1 and your length is 10 then it will fill up the remaining space with 0

null -> you can enter null or empty value in your db

not null -> required if you dont put anything then thats invalid

 

 

- Should i have to change the attributes ? ( to my language for ex ? ) ( i think this is the place that is asking us in what language we will save data. am i correct ? Why do we use this thing then ? )

 

tha q is not clear ???

so primary = unique ? What is the difference if both(primary key & unique) are unique data ? i should use the "unique" data for "memberid" then if it cant store same values... But for other values such as name and date, what should i use ?

 

What i mean with attributes is ; There is a "attriutes" section for each fields. And in this panel wants me to choose the following things ;

"armscii8 ..

binary

..

ujis

..

utf8"

i think this is a section for choosing the value's language. i m using utf8 and i think i should choose utf8 for name / surname / nickname / adress ? .. am i correct or this thing is for another thing ? this things are not included in the book i m following :(

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.