docs.roxen.comView this page in a printer friendly mode
DocsRoxenWebServer 4.5Web Developer ManualEmit Tags
Copyright © 2012, Roxen Internet Software
Suggestions, comments & compliments
manuals@roxen.com
 DEMO  DOCS  PIKE
 COMMUNITY  DOWNLOAD
www.roxen.com

   

<emit>
<emit atlas>
<emit cimg>
<emit dir>
<emit fonts>
<emit js-dynamic-popup>
<emit js-hide-popup>
<emit languages>
<emit ldap>
<emit path>
<emit sources>
<emit sql>
<emit timerange>
<emit values>

<emit source="sql"></emit>

Provided by module: Tags: SQL tags

Use this source to connect to and query SQL databases for information. The result will be available in variables named as the SQL columns.


Attributes

host="database"

Which database to connect to, usually a symbolic name set in the SQL Databases module. If omitted the default database will be used.


query="SQL statement"

The actual SQL-statement.


bindings=""name=variable,name=variable,...""

Specifies binding variables to use with this query. This is comma separated list of binding variable names and RXML variables to assign to those binding variables. Note: For some databases it is necessary to use binding variables when inserting large datas. Oracle, for instance, limits the query to 4000 bytes.
<set variable='var.foo' value='texttexttext' />
<sqlquery query='insert into mytable VALUES (4,:foo,:bar)' 
          bindings='foo=var.foo,bar=form.bar' />


charset="string"

Use the specified charset for the SQL statement and returned text values.

The valid charsets depend on the type of database connection. However, the special value "unicode" configures the connection to accept and return unencoded (possibly wide) unicode strings (provided the connection supports this).

An RXML run error is thrown if the database connection doesn't support the given charset or has no charset support at all. (At least MySQL 4.1 and later has support.)