sql/QueryRow

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
m (Also menu state)
 
Line 4: Line 4:
 
|Description=Performs the query like {{LibraryFunction|sql|Query}}, but returns the first row found.<br>
 
|Description=Performs the query like {{LibraryFunction|sql|Query}}, but returns the first row found.<br>
 
Basically equivalent to<pre>sql.Query("*query* LIMIT 1")</pre>
 
Basically equivalent to<pre>sql.Query("*query* LIMIT 1")</pre>
|Realm=Shared
+
|Realm=Shared and Menu
 
|IsClass=No
 
|IsClass=No
 
}}
 
}}

Latest revision as of 03:38, 24 July 2016

 sql.QueryRow( )

Contents

Description

Performs the query like sql.Query, but returns the first row found.

Basically equivalent to
sql.Query("*query* LIMIT 1")

Arguments

string query

The input query

Arguments

number row=1

The row number. Say we receive back 5 rows, putting 3 as this argument will give us row #3.

Returns

table

The returned row.
Personal tools
Navigation