Prev | Current Page 105 | Next

Marc Delisle

"Mastering phpMyAdmin 2.11 for Effective MySQL Management"

If we try the last choice, we see the following in the Edit panel for this row:
Chances are this is not our favorite image editor! In fact, data corruption may result
even if we save this row without touching the BLOB field. But the setting to remove
ProtectBinary exists because some users put text in their BLOB fields and they
need to be able to modify this text.
MySQL BLOB data types are actually similar to their corresponding TEXT data
types, but we should keep in mind that a BLOB has no character set, whereas a
TEXT column has a character set that impacts sorting and comparison. This is why
phpMyAdmin can be configured to allow editing of BLOB fields.
ENUM and SET
Both these field types are intended to represent a list of possible values; the difference
is that the user can choose only one value from a defined list of values with ENUM,
and more than one value with SET. With SET, the multiple values all go into one cell;
multiple values do not imply the creation of more than one row of data.
Changing Table Structures
[ 104 ]
We add a field named genre to the book table and define it as an ENUM. For now,
we choose to put short codes in the value list and make one of them, 'F', into the
default value:
In the value list, we have to enclose each value within single quotes, unlike in the
default value field. In our design, we know that these values stand for Fantasy, Child,
and Novel, but for now we want to see the interface's behavior with short codes.


Pages:
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117