Revision Difference
sql.QueryRow#560062
<function name="QueryRow" parent="sql" type="libraryfunc">
<description>
Performs the query like <page>sql.Query</page>, but returns the first row found.
⤶
Basically equivalent to :⤶
Performs the <page>sql.Query</page> and returns the n'th row.
⤶
This function is equivalent to safely returning⤶
```lua⤶
sql.Query(query)[row]⤶
```
sql.Query( query .. " LIMIT 1;" )⤶
```⤶
⤶
</description>⤶
</description>⤶
<realm>Shared and Menu</realm>
<file line="52-L66">lua/includes/util/sql.lua</file>
<args>
<arg name="query" type="string">The input query.</arg>⤶
<arg name="row" type="number" default="1">The row number. Say we receive back 5 rows, putting 3 as this argument will give us row #3.</arg>
<arg name="query" type="string">The query as used in sql.Query</arg>⤶
<arg name="row" type="number" default="1">The row number.</arg>
</args>
<rets>
<ret name="" type="table">The returned row.</ret>
</rets>
</function>