Home > Contents > Index >
Executes a simple query from a table.
<ICS.SELECTTO
TABLE="table name"
[WHAT="what criteria"]
LISTNAME="output list"
[WHERE="where criteria"]
[ORDERBY="orderby expression"]
[LIMIT="max number of results"]
/>
TABLE(required)cc.cacheResults property is enabled.
WHAT (optional)
LISTNAME(required)
WHERE(optional)where string, the value of the corresponding variable is used to construct a SQL where clause. All the elements in the comma-separated list must be variables. When you specify a datetime field as the where criteria, Sites uses the cc.datepicture property to convert the supplied datetime to the proper format.
ORDERBY (optional)orderby is a comma-separated list of column names. You can also override the default sort order by specifying ascending/descending with a (potentially) database specific command like:
orderby="colname1 desc,colname2 asc"
LIMIT(optional)limit parameter is omitted or is less than or equal to 0, then no limit exists and the entire recordset is returned.
The ics:selectto tag executes a simple query from a table. The results are stored in a list.
The possible values of errno include:
Value |
Description |
|---|---|
|
-101 |
No search results. |
|
-10005 |
One of the elements in the WHERE clause was not a variable. (All elements in the WHERE clause must be variables.). Other possible causes include missing parameters for the tag.
|
The following example lists out the table names for which the systable column has the value obj. The table names are retrieved from the SystemInfo table.
<SETVAR NAME="systable" VALUE="obj" /> <ICS.SELECTTO TABLE="SystemInfo" WHAT="tblname" LIMIT="-1" WHERE="systable" ORDERBY="tblname desc"/> The number of rows retrieved is <ICS.LISTGET LISTNAME="my_output" FIELDNAME="#numRows" /> The errno is <CSVAR NAME="Variables.errno" /> <LOOP LIST="my_output"> Name : <ICS.LISTGET LISTNAME="my_output" FIELDNAME="tblname" /> </LOOP>
| Home > | Contents > | Index > | ||
|
Oracle XML Tag Reference |
|||