Home  Contents

sql:columnName

Sql Core4 Lua Commands

SYNOPSIS

name = query:columnName(columnindex)

DESCRIPTION

Returns the name of a column in the the result set.

It can only return meaningful data if a SELECT statement has executed successfully.

The parameter columnindex indicates the column number within the result set, starting at 1. For example, if a SELECT statement looked like SELECT Name, Address, City FROM …, then column number 1 indicates the Name column, number 2 indicates the Address and number 3 indicates the City column.

RETURN VALUE

Returns a string on success or nil if no data is available. No further error reporting.

SEE ALSO