Rommeo Posted October 1, 2007 Share Posted October 1, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/71303-creating-mysql-table-phpmyadmin/ Share on other sites More sharing options...
teng84 Posted October 1, 2007 Share Posted October 1, 2007 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 ??? Quote Link to comment https://forums.phpfreaks.com/topic/71303-creating-mysql-table-phpmyadmin/#findComment-358786 Share on other sites More sharing options...
Rommeo Posted October 1, 2007 Author Share Posted October 1, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/71303-creating-mysql-table-phpmyadmin/#findComment-358910 Share on other sites More sharing options...
fenway Posted October 1, 2007 Share Posted October 1, 2007 Primary is a special form of unique, usually reserved for the UID field. Use unique everywhere else. Only one PK / table. Whatever collation you choose, keep it consistent for the entire database. Quote Link to comment https://forums.phpfreaks.com/topic/71303-creating-mysql-table-phpmyadmin/#findComment-358990 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.