sql.LastError

From GMod Wiki

Jump to: navigation, search
Function
Syntax sql.LastError( )
Where is this used?
Description:
Returns last error made from a query.
Returns: String
Part of Library: Sql
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Sql.LastError]Sql.LastError [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionTry to select from a table that doesn't exist.
Used onNewerShared.png
Code
sql.Query("SELECT * FROM nonexistingtable")
print(sql.LastError())
Outputno such table: nonexistingtable
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox