• tmysql
    5 replies, posted
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.
[QUOTE=Godlike2;27009536]If you would have read the readme you would have known the answer to this.[/QUOTE] 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 [url=http://www.facepunch.com/threads/1041852-Mysqloo-Error]this[/url] 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
Sorry, you need to Log In to post a reply to this thread.