The datatable object is a set of datarow objects derived from reading an SQL string on the currently open database.
table = database.getsql("SELECT * FROM customers WHERE nation =’italy’")
nrows = table.countrows()
rows = table.getrows()
for i = 1, nrows do
customername = rows[i].getvalue("name")
output.print(customername)
end
Returns the current number of rows.
Returns the list of rows as datarow objects.
Adds a new row to the datatable.