Databases Reference
In-Depth Information
In this example, the results are correct. However, other HTML entered in the data
field could produce surprising results (including invalid HTML pages). For example,
because phpMyAdmin presents results using HTML tables, a non-escaped </table>
tag in the data field would ruin the output.
Displaying Parts of a Text
The text/plain: substr transformation is available to display only a part of the text.
Here are the options:
First: where to start in the text (default: 0)
Second: how many characters (default: all the remaining text)
Third: what to display as a suffix to show that truncation has occurred
(default: ...)
Remember that $cfg['LimitChars'] is doing a character truncation for every non-
numeric field, so text/plain: substr is a mechanism for fine-tuning this field-by-field.
Download Link
Let's say we want to store a small audio comment about each book, inside
MySQL. We add to the books table a new field, with name audio_contents and
type MEDIUMBLOB , to the books 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 it 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.
 
Search WWH ::




Custom Search