Scripting/Squirrel/Functions/GetSQLColumnCount
Jump to navigation
Jump to search

This wiki is using an old backup from 2020
Some information may be old/missing
Get the column count in a query.
Syntax
GetSQLColumnCount( query )
Arguments
- query - Name of the previously executed query.
Return value
- The column count of 'query'.
Example
local db = ConnectSQL( "db.db" );
local query = QuerySQL( db, "SELECT * FROM Accounts" );
if ( query ) {
print( "There are " + GetSQLColumnCount( query ) + " accounts in database." );
FreeSQLQuery( query );
}