From f3c949dcb086f99bfad6c9856300b13e1ade6871 Mon Sep 17 00:00:00 2001 From: Thomas Hooge Date: Mon, 10 Dec 2018 14:56:37 +0100 Subject: [PATCH] Fixed config names, added feature documentation to readme --- README.md | 10 ++++++++++ syntax.php | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) 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;