docs.roxen.comView this page in a printer friendly mode
DocsRoxenWebServer 6.1Web Developer ManualDatabase Tags
Copyright  2018, Roxen Internet Software
Suggestions, comments & compliments



Provided by module: Tags: SQL tags

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.



Which database to connect to, among the list of databases configured under the "DBs" tab in the administrator interface. If omitted then the default database will be used.


A database URL to specify the database to connect to, if permitted by the module settings. If omitted then the default database will be used.

The database URL is on this format:


where driver is the database protocol, e.g. "odbc", "mysql", "oracle", "postgres", etc.

For compatibility this can also be a database name as given to the "db" attribute.


Access the local database for the specified Roxen module, if permitted by the module settings. This attribute is deprecated.

query="SQL statement"

The actual SQL-statement.


If specified, the query will be parsed by the RXML parser. Useful if you wish to dynamically build the query. This attribute is deprecated and will have no effect if the server compatibility level is above 2.1.


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 values. Oracle, for instance, limits the query to 4000 bytes.

<set variable='' value='texttexttext'/> <sqlquery query='insert into mytable VALUES (4,:foo,:bar)' bindings=','/>


Set the given variable to the insert id used by MySQL for auto-incrementing columns. Note: This is only available when MySQL is used.


Use the specified charset for the SQL statement. See the description for the "sql" emit source for more info.