docs.roxen.comBack to normal mode
DocsRoxenWebServer 3.4Web Developer ManualDatabase Tags
Copyright © 2006, Roxen Internet Software
Suggestions, comments & compliments
manuals@roxen.com

<sqlquery/>

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.


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.


parse

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 servers compatibility level is above 2.1.


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' />


mysql-insert-id="variable"

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