tmysql

Is there any tmysql3 documentation?

I want to use it but can find the syntax or manual on how to use it.

If you would have read the readme you would have known the answer to this.

Use MySQLOO.

Or yeah read the readme.

You know how read something and rephrase it from a steam chat. Congrats.

@iRzilla I want to use Mysqloo but I am having troubles using it as seen in this thread.

there is a readme

[lua]
Installation:
copy gm_tmysql.dll to garrysmod/garrysmod/lua/includes/modules
copy libmysql.dll to garrysmod/

libmysql is provided for your convenience, you can get it from the mysql website

Functions:

tmysql.initialize(host, user, pass, database, [port])
Starts the library

tmysql.query(sqlquery, [callback], [flags], [callbackarg])
Sends a query to the server, callback is a function, flags are
1 Assoc results Your callback will be sent a table with field names for keys
2 Last ID Your callback will be sent the last id as the third parameter
Callbacks are func([callbackarg], resulttable, querystatus, error or lastid)

tmysql.escape(sqlquery)
Returns an escaped string

tmysql.setcharset(charset)
Sets the character set

Use:

require(“tmysql”)

tmysql.initialize(host, user, pass, db, port) // call this once, you’re connected.

function callbackfunc(result, status, error)

end

tmysql.query(strquery, callbackfunc)

x = tmysql.escape(z)

Also see the two test files included

Compiling:

You need the mysql source headers and link against libmysql.lib
[/lua]

and tmysql is fine

That’s because you don’t understand what a variable is and how they work.