Database 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. However, 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 as shown in the screenshot:
For the previous example, we would store only the genre code in the
book 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 pop up
As an added benefit,phpMyAdmin offers a calendar pop up for easy data entry.
We will start by adding a DATE ield— date_published —to our book 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