Cursussen/Courses Codesnippets     Top 
phpMyAdmin - Fields


1. id field index choice
The first field is usually named 'id' (or something similar).
The field type is INT (integer) and you do not have to enter the length (the default is 11).
The 'id' field is the primary key (PRIMARY INDEX).
Select 'PRIMARY' from the index list. A dialog box appears.


2. add id field index
The 'Add Index' dialog box will appear automatically once you've made a selection. It suffices to click on the 'Start' button to create the primary key index.


3. id field auto increment
The primary key ('id' field) is also set to 'auto_increment'.
The value of the field is automatically incremented by 1 when a new record is added.
You do not have to enter a value in this field!


4. field benaming varchar
The field 'benaming' is assigned a field type 'varchar'.
The length is set to 255.


5. field omschrijving varchar
The field 'omschrijving' is assigned a field type 'varchar'.
The length is also set to 255.
If you expect to be able to enter long descriptions, you can use the field type 'TEXT'.


6. tijdstip field datetime
The field 'tijdstip' is assigned a field type 'DATETIME'.
If you only need a date field, choose the field type 'DATE'.