diff --git a/README.md b/README.md index 27bd8cd..c702fa6 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,14 @@ # sqlquery A dokuwiki plugin for processing query to MySQL databases and display results as a table. +This is a improved version which cann connect to different hosts +and databases. The default host and database is set in the plugin +configuration. +Different hosts and databases can be set inside the tag: +``` + +SELECT foo FROM bar ORDER BY baz + +``` + More information at https://www.dokuwiki.org/plugin:sqlquery diff --git a/syntax.php b/syntax.php index 9ddbb5a..ac3f9b7 100644 --- a/syntax.php +++ b/syntax.php @@ -43,13 +43,13 @@ class syntax_plugin_sqlquery extends DokuWiki_Syntax_Plugin { if (preg_match('/getConf('host'); + $data['host'] = $this->getConf('Host'); } # get database if (preg_match('/getConf('db'); + $data['db'] = $this->getConf('DB'); } # get query $data['match'] = $match;