Resources For Learning How To Use SQL With Gmod

Hey all,

I’m looking for some guides / tutorials etc. on connecting an SQL database with my lua scripts.

I’ve done a database module at uni so I already have an intermediate knowledge of SQL, I’m looking to learn how to integrate SQL rather than SQL itself.

This might help

You can use a database engine module for Garry’s Mod. The two most prominent options are tmysql4, which is no longer maintained but still works fine if you structure your queries to never be order-reliant if not called in order-by-callback; and mysqloo9 which is more of the standard and is still maintained. Both have their own separate syntaxes but create objects for the database where you can run queries.

[editline]3rd November 2017[/editline]

Alternatively, you can use the built-in SQLite library, but these can only be accessed by the Lua state and no outside applications/websites.