The exact
caption on this button depends on the browser. Even though editing is not allowed,
we can easily upload a text or binary file's contents into this BLOB column.
Let's choose an image file using the Browse button??”for example, the logo_left.png
file in a test copy of the phpMyAdmin/themes/original/img directory located on our
client workstation??”and click Go.
We need to keep in mind some limits for the upload size. Firstly, the BLOB field size
is limited to 64K, so phpMyAdmin reminds us of this limit with the Max: 65,536 Bytes
warning. Also, there could be limits inherent to PHP itself ??“ see Chapter 8, Importing
Structure and Data ??“ which would be also taken into account in this maximum size
value. We have now uploaded an image inside this field for a specific row:
Chapter 6
[ 103 ]
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 (BLOBs 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.
Pages:
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116