Databases Reference
In-Depth Information
Download Link
Let's say we want to store a small audio comment about each book, inside MySQL.
We add to the
book
table a new field, with name
audio_contents
and type
MEDIUMBLOB
, to the
book
table. We set its
MIME type
to
application/octetstream
and choose the
application/octetstream: download
transformation. In the options,
we insert
'comment.wav'
.
This MIME type and extension will inform our browser about the incoming data,
and the browser should open the appropriate player. To insert a comment, we first
record it in
.wav
format and then upload the contents of the file into the
audio_
contents
ield for one of the topics. When browsing our table, we can see a link for
our audio comment.
Hexadecimal Representation
Characters are stored in MySQL (as in computers in general) as numeric data, and
converted into something meaningful for the screen or printer. Users sometimes cut
and paste data from one application to phpMyAdmin, leading to unexpected results
if the characters are not directly supported by MySQL. A case I remember involved
special quotation marks entered in a Microsoft Word document and pasted to
phpMyAdmin. It helps to be able to see the exact hexadecimal codes, and this can be
done by using the
application/octetstream:
hex
transformation.
In the following example, we have applied this transformation to the
title
field of
our
book
table. When browsing the row containing the
Future souvenirs
title, we
now see:
Search WWH ::
Custom Search