Databases Reference
In-Depth Information
No external application is configured by default, and we have to explicitly add
our own.
The names of the transformation scripts are constructed using the
following format—the MIME type, a double underscore, and then
a part indicating which transformation should take place.
Every program that is allowed, along with its complete path, must be described here
with an index number starting from 0. Then we save the modifications to this script
and put it back on the server if needed. The remaining setup is completed from the
panel where we choose the options for the other browser transformations.
Of course, we will now choose text/plain: external in the transformations menu.
As the first option, we place the application number (for example, 0 would be for the
tidy application). The second option holds the parameters we need to pass to this
application. If we want phpMyAdmin to apply the htmlspecialchars() function
to the results, we put 1 as the third parameter—this is the default. We could put a 0
there to avoid protecting the output with htmlspecialchars() .
If we want to avoid reformatting the cell's lines, we put 1 as the fourth parameter.
This will use the NOWRAP modifier, and is done by default.
External application example: In-cell sort
This example shows how to sort the text contents of a single cell. We start by
modifying the text_plain__external.inc.php script, as mentioned in the
previous section, to add the sort program:
$allowed_programs[0] = '/bin/sort';
Note that our new program bears the index number 0 .
We then add a TEXT column whose name is keywords to our book table. Finally, we
fill in the MIME-related information, entering '0','-r' as the transformation options, as
shown in the following screenshot:
 
Search WWH ::




Custom Search