History: AdminDSN
Preview of version: 6
Have you ever wished you could retrieve data that is actually in TikiWiki's (or some other) database, but not organized or displayed on-screen in the way you'd like? The SQL plugin can be used to display the results of SELECT queries in a Wiki page. The plugin displays the results of the query in an attractively formatted table.
To use the SQL plugin, you must do the following:
- Use Admin DSN to define the database to be used by the SQL plugin.
- Place a SQL plugin statement in a Wiki page. Please see PluginSQL for instructions.
This page page shows you how to define a DSN so that the SQL plugin can access external data.
This documentation is based on TikiWiki 1.7.5.
1. On the main Tiki menu, click next to Admin, if necessary, to show the options below this menu item, and choose Admin DSN. You'll see the Admin DSN page, shown here:
First of all you have to setup the databases that can be used in this plugin using the admin dsn feature. As admin click on admin dsn to enter this screen:
insert graphic
In this screen you can admin PEAR::Db DSNs that may be used from the SQL plugin, a DSN has to indicate the database type (e.g., "mysql"), the user, password, host and database name to be used.
You have to associate DSNs to some name that must not contain whitespaces. To do so, choose Admin DSNs (an option beneath Admin on the default TikiWiki menu). You'll need to create a name for the DSN and supply the DSN itself in the correct syntax.
Here's the DSN syntax:
DSN format: database-type://user:password@host/database-name
In this example we are creating a DSN for the database tiki in host localhost using the user root and the password seldon. The DSN will be named cosa.
Here's how the DSN looks:
mysql://root:seldon@localhost/tiki
When a DSN is created with name 'foo' the permission tiki_p_dsn_foo is automatically created. Only users with that permission can use the DSN to create a query or view the results of a query using that DSN.
DSN goes in the format
database://user:password@host/database
Please see PluginSql
For the PluginSql to work you will need to set the AdminDSN in the admin menu.
Who is working here generally? Link UserPage.
History
| Information | Version | |||||
|---|---|---|---|---|---|---|
| Marc Laporte | 17 | |||||
| Xavier de Pedro | 16 | |||||
| Philippe Cloutier Fixed ~np~ | 15 | |||||
| Eric Poiseau | 14 | |||||
| swampfox | 13 | |||||
| Mose test of thumb plugin | 12 | |||||
| Stephen Lee | 10 | |||||
| Bryan Pfaffenberger | 9 | |||||
| Bryan Pfaffenberger | 8 | |||||
| Bryan Pfaffenberger | 7 | |||||
| Bryan Pfaffenberger | 6 | |||||
| DennisDaniels gosh these docs are way too thin | 5 | |||||
| DennisDaniels | 4 | |||||
| DennisDaniels | 3 | |||||