Prev | Current Page 218 | Next

Marc Delisle

"Mastering phpMyAdmin 2.11 for Effective MySQL Management"

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:
Chapter 16
[ 249 ]
As we know which character set this column is encoded with (see Chapter 17),
we can compare its contents with a chart describing each character. For instance,
http://en.wikipedia.org/wiki/Latin1 describes the latin1 character set.
SQL Pretty Printing
Let's say we are using a table to store the text of a course about SQL. In one column,
we might have put sample SQL statements. With the text/plain: sql transformation,
these SQL statements will be displayed in color with syntax highlighting, when
browsing this table.
External Applications
The transformations that have been described previously are implemented directly
from within phpMyAdmin. However, some transformations are better done via
existing external applications.
The text/plain: external transformation enables us to send the cell's data to another
application that will be started on the web server, capture this application's output,
and display it in the cell's position.


Pages:
206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230