Scripting/Squirrel/Functions/GetSQLColumnCount: Difference between revisions
Jump to navigation
Jump to search
This wiki is using an old backup from 2020
Some information may be old/missing
(Created page with "Get the column count in a query. == Syntax == <pre>GetSQLColumnCount( query )</pre> == Arguments == * '''query''' - Name of the previously executed query. == Return valu...") |
(No difference)
|
Revision as of 10:40, 11 March 2016
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 );
}