Raised This Month: $51 Target: $400
 12% 

Help a noob set up SQL for their server.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
QuantumToast
Member
Join Date: May 2017
Location: US
Old 06-18-2017 , 06:02   Help a noob set up SQL for their server.
Reply With Quote #1

Hello all, you might recognize me from my oh-so-popular thread over here, Infractions. I know absolutely nothing about SQL, outside of the tiny bits of experience I have directly modifying some databases in the past.
It is to my understanding that Sourcemod has basic support for MySQL and SQLite. While there is obviously documentation, examples, and help for the aforementioned topic, my questions lie more in the range of SQL itself. I'll try and be concise and just list my questions here.
  1. How easy/difficult is it to set up an SQL database for a dedicated server? (This is on a game server provider, I am not hosting my server locally.)
  2. Does setting up SQL on my server require an SQL database hosting program?
  3. If not, am I supposed to put the database files somewhere specific?
  4. What are some good resources to learn syntax and formatting for SQL queries and "commands", if you will?
I know some of these questions are easily Google-able, but since they aren't just basic SQL-related commands, and more related to its integration into Sourcemod, I felt the need to ask it here. I've never used SQL before, so please, go easy on me if you can. I'm willing to learn. Have a good day

Last edited by QuantumToast; 06-18-2017 at 06:03.
QuantumToast is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 06-18-2017 , 07:49   Re: Help a noob set up SQL for their server.
Reply With Quote #2

1. easy if you are using a GSP
2. yes for mysql and no for sqlite
3. for sqlite just setup the database.cfg inside sourcemod/config folder
4. google is best for this answer
8guawong is offline
Kryptanyte
Junior Member
Join Date: Dec 2015
Old 06-18-2017 , 07:59   Re: Help a noob set up SQL for their server.
Reply With Quote #3

Not that difficult at all. I suggest you take a look at the wiki entry:

https://wiki.alliedmods.net/SQL_(SourceMod_Scripting)

I believe if you use SQLite you have to create database tables via the plugin. Not too sure though as I've never really used it.

SQLite doesn't require any hosting program as it's a local file stored inside of the sourcemod folder. MySQL on the other hand does. Usually this is externally hosted and can be used for multiple servers.

You don't really need to worry about SQL Commands specifically, just syntax and the language really. This is one place you could learn about the language:
https://www.w3schools.com/SQL/deFault.asp

You could also look how other plugins handle their databasing as well, in fact I recommend doing this as it'll help you understand the flow of SQL in sourcemod
Kryptanyte is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:55.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode