Scripting/Squirrel/Functions/GetSQLColumnData

From Vice City Multiplayer
Revision as of 08:35, 5 March 2016 by KAKAN (talk | contribs) (Created page with "Get a result row as a string. == Syntax == <pre>GetSQLColumnData( query, columnNumber )</pre> == Arguments == * '''query''' - Name of the previously executed query. * ''...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Caution icon
This wiki is using an old backup from 2020
Some information may be old/missing

Get a result row as a string.

Syntax

GetSQLColumnData( query, columnNumber )

Arguments

  • query - Name of the previously executed query.
  • columnNumber - Number of the column you want to get data of.

Return value

  • The data in the column and/or null on failure

Example

local c = ConnectSQL("db.db");
local d = QuerySQL(c,"SELECT Cash FROM Accounts WHERE Name='KAKAN'"), e = GetSQLColumnData( d, 0 );
if( e ) print( "KAKAN has " + e + "$" );