• Making a Point System running from MySQL
    7 replies, posted
No I don't have any code this isn't code (error) help. [b] Why?[/b] I'm making a unique point system for my server and I want to figure this out before I start. [b] What Do I Need?[/b] I would like to know if there is a place that I can pull code from that instead of using the default SQLite, use MySQL. With obviously filling in the Host, username, password etc. I don't know if there is a template to go by, which again is basically what I'm asking for. If there is a place that has this please let me know. I don't feel like ripping it from an addon because that's ultimately pointless and will waste more time than not doing so. If there is no place that has this, can someone lead me in the right direction in setting the tables for MySQL and using them. Thank You!
[url]http://wiki.garrysmod.com/page/sql/Query[/url] - how to run querys in gmod [url]https://www.sqlite.org/lang.html[/url] - doc on the commands [url]http://sqlitebrowser.org/[/url] - useful for browsing the .db file gmod stores things in and gives you query's to make copy of tables in there
I don't quite understand the question, what do you mean template to go by? The only real thing to consider when doing this is the database structure, other than that it's pretty straight forward. [QUOTE=rtm516;50453591][url]http://wiki.garrysmod.com/page/sql/Query[/url] - how to run querys in gmod [url]https://www.sqlite.org/lang.html[/url] - doc on the commands [url]http://sqlitebrowser.org/[/url] - useful for browsing the .db file gmod stores things in and gives you query's to make copy of tables in there[/QUOTE] [quote]instead of using the default SQLite[/quote]
[QUOTE=rtm516;50453591][url]http://wiki.garrysmod.com/page/sql/Query[/url] - how to run querys in gmod [url]https://www.sqlite.org/lang.html[/url] - doc on the commands [url]http://sqlitebrowser.org/[/url] - useful for browsing the .db file gmod stores things in and gives you query's to make copy of tables in there[/QUOTE] Thank you for replying but that is the complete opposite of what I asked for. These run on SQLite, which I'm trying to stay away from.
[QUOTE=Vizik;50453608]Thank you for replying but that is the complete opposite of what I asked for. These run on SQLite, which I'm trying to stay away from.[/QUOTE] Why are you trying to stay away?
[QUOTE=bigdogmat;50453603]I don't quite understand the question, what do you mean template to go by? The only real thing to consider when doing this is the database structure, other than that it's pretty straight forward.[/QUOTE] Instead of using the default query for sqlite (which is gmod uses by default) make it use MySQL. So making tables might be the same but connecting to it and using it is the kicker here. [editline]4th June 2016[/editline] [QUOTE=rtm516;50453614]Why are you trying to stay away?[/QUOTE] I'm using multiple things off one database and want them to communicate, so doing so would be impossible to run data off of SQLite.
[url]https://facepunch.com/showthread.php?t=1442438[/url] [LUA]local Database, error = tmysql.Connect("localhost", "root", "root", "test", 3306, nil, CLIENT_MULTI_STATEMENTS)[/LUA]
[QUOTE=rtm516;50453635][url]https://facepunch.com/showthread.php?t=1442438[/url] [LUA]local Database, error = tmysql.Connect("localhost", "root", "root", "test", 3306, nil, CLIENT_MULTI_STATEMENTS)[/LUA][/QUOTE] Okay thank you :)
Sorry, you need to Log In to post a reply to this thread.