sql - luxembourg/muxcode-clm GitHub Wiki
SQL()
FUNCTION: sql(<query>[,<row-delim>[,<col-delim>]])
The sql() function uses a connection to a SQL database. The <query> parameter is given to SQL as if it were given at a normal SQL prompt. By default, the row delimiter, <row-delim>, defaults to a space, and the column delimiter, <col-delim>, defaults to the row delimiter, <row-delim>.
Examples:
sql(select foo%,bar from mytable,~,|)
would turn into
1|aardvark2|anteater3|antelope
...or whatever data happens to exist in SQL. It is worth remembering both that you must escape commas in the query portion of the function, and that using this command is a bottleneck; the game cannot do anything else until the query returns. Normally this will not be an issue, but if you write code doing 700 large SQL queries in a row, the game will almost certainly lag.
The function is only available if the INLINESQL feature is enabled.
Related Topics: @query