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
https://forums.phpfreaks.com/topic/71303-creating-mysql-table-phpmyadmin/
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 ???

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 :(

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.