PmWiki |
Cookbook »
Odbc Pm WikiSummary: Query a odbc-SQL database server (MS-SQL) and display the results in a wiki page
Version: 2009-10-01
Prerequisites: a running odbc connection (FreeTDS), apche withh odbc module
Status:
Maintainer:
Categories: Integration, Data
Discussion: OdbcPmWiki-Talk
SolutionA 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
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 last variables is optional. All others must be set for odbcPmWiki to work. DescriptionThis 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. Usage(:odbcPmWiki SQL statement:) Example(:odbcPmWiki select * from dbo.ExchangeSRV_Prefs :)
Release notes
See alsoMyPmWiki, SelectQuery, DataQuery ContributorsCommentsSee 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. |
|
Page last modified on December 23, 2021, at 06:48 AM | Edit - History - Recent Changes (All) - Search |