DbInfo Action Documentation
This is the documentation page for the dbinfo action.NOTE
This feature is available since:
WikkaWiki 1.1.6.4
WikkaWiki 1.1.6.4
See also
- DbInfoAction: Additional development notes
Documentation
Short description
An action that provides administrators an easy way to inspect the structure of the tables Wikka is using.Usage
{{dbinfo [all="0|1"] [prefix="0|1"]}}name | type | required? | default | description |
---|---|---|---|---|
all | int | optional | 0 | By specifying all='1' possibly more databases become visible (depending on the permissions of the Wikka database user). If multiple databases are visible, a selection form is shown to pick a database. |
prefix | int | optional | 1 | By specifying prefix='0' the prefix configured for Wikka is ignored, allowing other tables in the same database (if any) to be inspected. |
Long description
WhyAdmins, and especially admins that like to tweak Wikka and create their own extensions, frequently need to check what exactly the database structure is that Wikka is using. Column names, sizes, indexes, etc. are important things to know when creating extensions.
Of course, it's possible to use an external client such as PhpMyAdmin or a desktop client, but for a quick lookup it's handy to have that information available right inside Wikka.
How
Although the PHP implementation of MySQL provides a few shortcuts with special functions, these don't support all information that we need. However, the MySQL SHOW command can reveal all we need to know, and it can be used with the PHP PHP:mysql_query | function.
Limitations
Since revealing database structure is a potential security risk, only administrators will be able to see what this action has on offer.
Apart from that, it makes use of the configured Wikka database user; what this user can see really depends on what permissions it has been given prior to installation of Wikka, so your mileage may vary.
Author
JavaWomanCategoryEN