Book Image

Mastering phpMyAdmin 2.11 for Effective MySQL Management

Book Image

Mastering phpMyAdmin 2.11 for Effective MySQL Management

Overview of this book

Table of Contents (25 chapters)
Mastering phpMyAdmin 2.11 for Effective MySQL Management
Credits
About the Author
About the Reviewers
Preface

Examples of Transformations


We will now discuss a few transformation examples. We will start by changing the field type of our cover_photo field.

Clickable Thumbnail (.jpeg or .png)

We change our cover_photo field type from BLOB to MEDIUMBLOB to ensure that we can upload photographs that are bigger than 65 KB to it. We then enter the following attributes:

Here, the options are presented as width,height. If we omit the options, the default values are 100,100. The thumbnail generation code preserves the original aspect ratio of the image, so the values entered are the maximum width and height of the generated image. We then upload a .jpeg file in a cell (using instructions from Chapter 6). As a result, we get the following in Browse mode for this table:

This thumbnail can be clicked to reveal the full-size photograph.

Note

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...