Roxen.git / server / modules / tags / sqltag.pike

version» Context lines:

Roxen.git/server/modules/tags/sqltag.pike:1:   // This is a roxen module. Copyright © 1997-1999, Idonex AB.   //   // A module for Roxen, which gives the tags   // <sqltable>, <sqlquery> and <sqloutput>.   //   // Henrik Grubbström 1997-01-12    - constant cvs_version="$Id: sqltag.pike,v 1.44 2000/02/05 04:29:04 nilsson Exp $"; + constant cvs_version="$Id: sqltag.pike,v 1.45 2000/02/20 22:46:05 kuntri Exp $";   constant thread_safe=1;   #include <module.h>      // Compatibility with old versions of the sqltag module.   // #define SQL_TAG_COMPAT      inherit "module";   inherit "roxenlib";      Configuration conf;
Roxen.git/server/modules/tags/sqltag.pike:20:      // Module interface functions      constant module_type=MODULE_PARSER|MODULE_PROVIDER;   constant module_name="SQL tag module";   constant module_desc="This module gives the three tags &lt;SQLQUERY&gt;, "    "&lt;SQLOUTPUT&gt;, and &lt;SQLTABLE&gt;.<br>\n";      TAGDOCUMENTATION   #ifdef manual - constant tagdoc=(["sqltable":"<desc tag>SQL table</desc>", -  "sqlquery":"<desc tag>SQL query</desc>","sqloutput":"<desc cont>SQL output</desc>"]); + constant tagdoc=([ + "sqltable":" + <desc tag> +  Creates an HTML or ASCII table from the results of an SQL query. + </desc> +  + <attr name=ascii> +  Create an ASCII table rather than a HTML table. Useful for +  interacting with the <ref type=tag>diagram</ref> and <ref +  type=tag>tablify</ref> tags. + </attr> +  + <attr name=host type=database> +  Which database to connect to, usually a symbolic name. If omitted the +  default database will be used. + </attr> +  + <attr name=query> +  The actual SQL-query. + </attr> +  + <attr name=quiet> +  Do not show any errors in the page, in case the query fails. + </attr> +  + <attribute name=parse> +  If specified, the query will be parsed by the RXML parser. +  Useful if you wish to dynamically build the query. + </attribute>", +  + "sqlquery":" + <desc tag> +  Executes an SQL query, but doesn't do anything with the result. This +  is mostly used for SQL queries that change the contents of the +  database, for example INSERT or UPDATE. + </desc> +  + <attr name=host type=database> +  Which database to connect to, usually a symbolic name. If omitted the +  default database will be used. + </attr> +  + <attr name=query type=SQL query> +  The actual SQL-query. + </attr> +  + <attr name=quiet> +  Do not show any errors in the page, in case the query fails. + </attr> +  + <attr name=parse> +  If specified, the query will be parsed by the RXML parser. Useful if +  you wish to dynamically build the query. + </attr>"]);   /* -  "Usage:<ul>\n" -  "<table border=0>\n" -  "<tr><td valign=top><b>&lt;sqloutput&gt;</b></td>" -  "<td>Executes an SQL query, and " -  "replaces #-quoted fieldnames with the results. # is " -  "quoted as ##. The content between &lt;sqloutput&gt; and " -  "&lt;/sqloutput&gt; is repeated once for every row in the " -  "result.</td></tr>\n" +     "<tr><td valign=top><b>&lt;sqlquery&gt;</b></td>\n"    "<td>Executes an SQL query, but "    "doesn't do anything with the result. This is useful if "    "you do queries like INSERT and CREATE.</td></tr>\n"    "<tr><td valign=top><b>&lt;sqltable&gt;</td>"    "<td>Executes an SQL query, and makes "    "an HTML table from the result.</td></tr>\n"    "</table></ul>\n"    "The following attributes are used by the above tags:<ul>\n"    "<table border=0>\n"