wiki:SqlQueryMacro

Version 2 (modified by JamesMills, 7 years ago) (diff)

--

Execute an SQL Query

Description

Execute an SQL Query against a configured database displaying a formatter table of results.

Bugs/Feature Requests

Existing bugs and feature requests for SqlQueryMacro are here.

If you have any issues, create a new ticket.

Download

Download the zipped source from here.

Source

You can check out SqlQueryMacro from here using Subversion, or browse the source with Trac.

Example

This macro can be used in one of two ways:

{{{
#!SQL
SELECT * FROM foo
}}}

or

[[SQL(SELECT * FROm foo)]]

Install

This macro requires the pymills library and makes use of it's db and table modules. Please install pymills first.

easy_install pymills

To install the macro:

easy_install TracSqlQueryMacro

To enable:

[components]
sqlquery.* = enabled

Recent Changes

[8485] by rjollos on 2010-08-28 05:55:46
There is no htdocs dir, so the ITemplateProvider method should return nothing. Fixes #2698.
[3263] by JamesMills on 2008-02-22 09:52:27
Alpha
[3262] by JamesMills on 2008-02-22 00:34:13
New hack SqlQueryMacro, created by JamesMills

Author/Contributors

Author: JamesMills
Contributors: