Databases Reference
In-Depth Information
SQL pretty printing
The term pretty printing ( http://en.wikipedia.org/wiki/Pretty_printing )
refers to a way of "beautifying" source code (in our case, SQL statements). In
the phpMyAdmin configuration storage, the pma_bookmark.query and pma_
history.sqlquery columns contain SQL statements. With the text/plain: sql
transformation defined for these columns, these SQL statements will be displayed in
color with syntax highlighting when the table is browsed.
IP address
An IP (v4) address can be encoded into a long integer (for example, via the PHP
iptolong() function), and stored into a MySQL UNSIGNED INT column. To convert
it back to the familiar dotted string (for example, 127.0.0.1 ), you can use the text/
plain: longToIpv4 transformation.
Transforming data via external applications
The transformations that have been described previously are implemented directly
from within phpMyAdmin. However, some transformations are better executed via
existing external applications.
The text/plain: external transformation enables us to send a cell's data to
another application that will be started on the web server, capture this application's
output, and display this output in the cell's position.
This feature is supported only on a Linux or UNIX server (under
Microsoft Windows, output and error redirection cannot be easily
captured by the PHP process). Furthermore, PHP should not be
running in safe mode. Hence, the feature may not be available on
hosted servers.
For security reasons, the exact path and name of the application cannot be set from
within phpMyAdmin as a transformation option. The application names are set
directly inside one of the phpMyAdmin scripts.
First, in the phpMyAdmin installation directory, we edit the text_plain__
external.inc.php file in libraries/transformations/ , and find the
following section:
$allowed_programs = array();
//$allowed_programs[0] = '/usr/local/bin/tidy';
//$allowed_programs[1] = '/usr/local/bin/validate';
 
Search WWH ::




Custom Search