$sqlQuery

Executes the given sql statement on the database of the current branch by using a transaction in 'read only' mode.
Syntax
    $sqlQuery{sql_statement}{line_begin_token}{line_end_token}{cell_begin_token}{cell_end_token}
DocumentationExecutes the given sql statement on the database of the current branch by using a transaction in 'read only' mode:

    Parameters:
      sql_statement, the sql statement to execute.
      line_begin_token, line_end_token, cell_begin_token, cell_end_token, optional values used to format the
      table returned as a result of the executed statement. If those tokens are not specified to the function call
      then the table will not be returned and its entries can be accessed by calling $sqlResultSet.
Examples
Example 1:
    $set {table1}{user2DB}
    $// creates table, column names and type
    $sql {create table $get{table1} (firstName varchar, content varchar)} ... table $get{table1} created successfully.
    $// inserts values into table
    $sql {insert into $get{table1} values ('jack', 'call again')} ... values inserted successfully.
    $// selects all from table, query transaction, returns values in a table
    $sqlQuery {select * from $get{table1}}{<td><b>}{</b></td>}{<tr>}{</tr>}

    Result:
    creates table "user2DB" with the column definition "firstName" of
    type varchar in the first column and "content" of type varchar in
    the second column
    inserts value "jack" into the first column and "call again" into the
    second column
    executes query from table "userDB2" and returns the result in a
    table:
    ... table user2DB created successfully.
    ... values inserted successfully.
    jack call again
Example 2:
    $set {table1}{user3DB}
    $sql {create table $get{table1} (firstName varchar, content varchar)}
    ... table $get{table1} created successfully.
    $set{i}{0}
    $while{$less{$get{i}}{4}}
      {
      $sql {insert into $get{table1} values ('jack', 'call again')}
      $set{i}{$inc{$get{i}}}
      }
    ... values inserted successfully.
    $sqlQuery {select * from $get{table1}}
    $while {$sqlResultSet{next}}
      {
      $sqlResultSet{getCell}{1} | $sqlResultSet{getCell}{2}<BR>
      }
    Result 2:
    creates table "user3DB" with the column definition "firstName" of
    type varchar in the first column and "content" of type varchar in
    the second column
    inserts value "jack" into the first column and "call again" into the
    second column of each row while variable "i" is less than "4"
    executes query from table "user3DB" and returns the result using
    the function sqlResultSet:
    ... table user3DB created successfully.
    ... values inserted successfully.
    jack | call again
    jack | call again
    jack | call again
    jack | call
GroupSQL
Minimum required transaction-mode:READ
Required scripting permission of the developerPERMISSION_FL_EXPERT
Minimum parameters1
Maximum parameters 5