Scripting/Squirrel/Functions/mysql fetch assoc: 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 a result row as a table == Syntax == <pre>mysql_fetch_assoc( MySQLQuery query )</pre> == Arguments == * ''MySQLQuery'' '''query''' - A valid MySQL result == Return valu...") |
No edit summary |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 17: | Line 17: | ||
</pre> | </pre> | ||
== Related Functions == | |||
{{Scripting/Squirrel/Functions/MySQL Functions}} | |||
[[Category:Scripting/Squirrel/Functions/Mysql_Functions]] |
Latest revision as of 18:28, 30 January 2017
Get a result row as a table
Syntax
mysql_fetch_assoc( MySQLQuery query )
Arguments
- MySQLQuery query - A valid MySQL result
Return value
The row's column as a table
Example
local c = mysql_query( handler, "SELECT Cash, Kills FROM Accounts WHERE Name='KAKAN'" ); local d = mysql_fetch_assoc( c ); print("Cash: " + d["Cash"] + ", Kills: " + d["Kills"] ); mysql_free_result( c );