Scripting/Squirrel/Functions/GetSQLColumnCount

From Vice City Multiplayer
Jump to navigation Jump to search
Caution icon
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 );
}

Related Functions