Databases Reference
In-Depth Information
If $cfg['ShowBlob'] is set to TRUE , we see the following in the BLOB field:
To really see the image from within phpMyAdmin, refer to
Chapter 16, MIME-Based Transformations .
The $cfg['ProtectBinary'] parameter controls what can be done while editing
binary fields ( BLOB s and any other field with the binary attribute). The default
value 'blob' protects against the editing of BLOB fields but allows us to edit other
fields marked as binary by MySQL. A value of 'all' would protect against editing
even binary fields. A value of FALSE would protect nothing, thus allowing us to edit
all fields. 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.
 
Search WWH ::




Custom Search