Garry's Mod Wiki

sql.LastError

Description

Returns the last error from a SQLite query.

Returns

1 string
error

Example

Reports all SQL errors into console automatically. Can help on debugging or testing

sql.m_strError = nil -- This is required to invoke __newindex setmetatable(sql,{__newindex = function(t,k,v) if k == "m_strError" and v then print("[SQL Error] "..v) end end})
Output: After running sql.Query("SELECT") will print [SQL Error] incomplete input in the console.

Page Links


Special Pages


Wikis

?

Render Time: 34ms

Session 0
DB GetPage 4
Generate Html 6
SaveChanges 11
Render Body 0
Render Sidebar 11