A module called odbcPmWiki that allows you to use SQL statements in a wiki page to query a odbcSQL database and display the results with a table.
Installation on Linux
- install and activate your odbc software
unixODBC,freetds, php-odbc modules
- configure your ODBC-connect (the hardest work)
- test this connection with something like
echo "select * from dbo.ExchangeSRV_Prefs" | isql <dsn> <user> <passwd>
Add this script to your "local" directory:
Include it in config.php with:
$odbcPMWiki_dsn = 'msdsn'; $odbcPMWiki_Username = 'user'; $odbcPMWiki_Password = 'secret'; $odbcPMWiki_TableFmt = 'class=\'tabtable\''; include_once('cookbook/odbcpmwiki.php');
explanation of the variables:
- the DSN of the ODBC-Connection
- username to access the ODBC-Connection
- password to access the ODBC-Connection
- formatting for the table tag (default is "border='1'")
The last variables is optional. All others must be set for odbcPmWiki to work.
This is a quick hack to access a MS-SQL from a Linux box. I created this receipt because the other ones where to complex and did not run in my installation. This is a transcription of the Receipt MyPmWiki from mySql to a odbc-Connection.
(:odbcPmWiki SQL statement:)
- The first running Version
If the recipe has multiple releases, then release notes can be placed here. Note that it's often easier for people to work with "release dates" instead of "version numbers".
MyPmWiki, SelectQuery, DataQuery
See discussion at OdbcPmWiki-Talk?
User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.