Databases Reference
In-Depth Information
This thumbnail can be clicked to reveal the full-size photograph.
The thumbnail is not stored anywhere in MySQL, but generated each time
we go into Browse mode for this set of rows. On a double Xeon 3.2GHz
server, we commonly experience a generation rate of 6 JPEG images
per second.
For a .png file, we have to use image/png as the MIME type, and image/png: inline
as the transformation.
Another point to note: we have seen in Chapter 6, in section BLOB (Binary Large
Object) Fields that the $cfg['ShowBlob'] parameter is normally used to permit
or block the display of BLOB contents, but this parameter does not influence the
thumbnail's display—it can be set to TRUE or FALSE .
Links to an Image
To get a link without thumbnails, we use the image/jpeg: link transformation. There
are no transformation options. This link can then be used to view the photograph
(by left-clicking on the link), and then possibly download it (by right-clicking on the
photograph itself):
Date Formatting
We have a field named date_published in our book table; let's ensure that its
type is DATETIME . Then we set its MIME type to text/plain , and the browser
transformation to text/plain: dateformat . The next step is to edit the row for the
'Future souvenirs' book, and enter 2003-01-01 14:56:00 in the date_published field
When we browse the table, and see the field formatted. Moving the mouse over the
field reveals the unformatted original contents:
 
Search WWH ::




Custom Search