lua:db:exec
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
lua:db:exec [2016/02/08 05:08] – vodur | lua:db:exec [2016/02/08 05:37] (current) – vodur | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | db.exec( statement ) | + | <font 18px/ |
Execute sql statement. | Execute sql statement. | ||
If statement is a query, return value is a table with the query results. | If statement is a query, return value is a table with the query results. | ||
+ | |||
+ | See also [[: | ||
+ | |||
+ | ===== Examples: ===== | ||
Check if a table exists: | Check if a table exists: | ||
Line 51: | Line 55: | ||
<code lua> | <code lua> | ||
- | local result=[[SELECT animal_name, | + | local result=db.exec[[SELECT animal_name, |
for _,row in result do | for _,row in result do |
lua/db/exec.1454908139.txt.gz · Last modified: 2016/02/08 05:08 by vodur