Databases Reference
In-Depth Information
With the modified value list, the Insert panel now looks as follows:
Observe that the radio buttons have been replaced by a drop-down list because the
possible values are longer.
If we want more than one possible value selected, we have to change the field type to
SET . The same value list may be used, but now, using our browser's multiple value
selector (control-click on a Windows or Linux desktop, command-click on a Mac), we
can select more that one value:
For the previous example, we would store only the genre codes in the
topic table, in a normalized data structure and would rely on another
table to store the description for each code. We would not be using SET or
ENUM in this case.
DATE, DATETIME, and TIMESTAMP
We could use a normal character field to store date or time information, but DATE ,
DATETIME , and TIMESTAMP are more efficient for this purpose. MySQL checks
the contents to ensure valid date and time information, and offers special functions
to work on these fields.
Calendar Popup
As an added benefit, phpMyAdmin offers a calendar popup for easy data entry.
We will start by adding a DATE field, date_published , to our topic table. If we go
into Insert mode, we should now see the new field where we could type a date. A
Calendar icon is also available:
 
Search WWH ::




Custom Search