GetRowsByTemplate

GetRowsByTemplate method retrieves a number of rows returned by SQL query template. To use a template, it needs to be defined in ExpertSender web panel first. Template can be any valid SQL query that returns rows (SELECT query). It is possible to create templates with parameters.


1. Method signature

rows = GetRowsByTemplate(template, parameters)

Parameter definition

Param object parameter definition

NOTE: typically, Param objects are created using constructor, which is more convenient. See examples for more information.


2. Using GetRowsByTemplate method

Example - simple request using template with two parameters:

GetRowsByTemplate('MyTemplate', new [] {new Param('numberParam', 123), new Param('textParam', 'abc')})

Returned output is the same as with regular GetRows method. You may enumerate rows, access rows and columns by indexes etc. Please see GetRows documentation for more details.