8000 GitHub - bailmast/gm-sickql: Garry's Mod database interface
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
< 8000 div class=" d-flex flex-wrap flex-items-center wb-break-word f3 text-normal"> / gm-sickql Public

Garry's Mod database interface

License

Notifications You must be signed in to change notification settings

bailmast/gm-sickql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 

Repository files navigation

SickQL

Garry's Mod database interface that supports SQLite, TMySQL & MySQLOO.

Usage

-- connection using any driver is thread-blocking
local connection, err = SickQL.New({
  Driver = 'tmysql', -- either sqlite, tmysql or mysqloo
  Hostname = 'localhost',
  Port = 3306,
  Username = 'root',
  Password = 'root',
  Database = 'sys',
})

if err ~= nil then
  print('Connection failed: ' .. err)
end

print('Database is connected!')

connection:Query('select version()', function(data)
  print('Database version is ' .. data[1]['version()'])
end, function(why)
  print('Failed to get version from query: ' .. why)
end)
0