SQL
In your guy's opinion, what is the easiest/securest way to add MySQL support on an addon, so it saves certain data in the DB?
Should i use MySQLOO or TMySQL4?
MySQLOO https://github.com/syl0r/MySQLOO
More updated and fixes bugs it also has parts of TMySQL4 in it
ByAnthony Fullerat 16th of July 2017 07:33:40
MySQLOO https://github.com/syl0r/MySQLOOMore updated and fixes bugs it also has parts of TMySQL4 in it
Alright Thanks, whats the best way to include it in an addon? I've seen many ways of it being done or don't you know?
Create your own "Wrapper"/Handler which translates whatever you need to the MySQLOO Syntax.
Here's some Code part of my IP Geo Blocker, which gives me the ability to easily insert a new SteamID to the Whitelist. Also this shows you how to do prepared querys: 1. Create them 2. OnError&OnSucces 3.setString() 4.start()
Also: Use prepared query, as they are a lot safer. I created a handler for SQLite, MySQLOO and Tmysql4. And the most important thing: If you're not using perpared Statements, than escape the strings (google).
IDK if this Code is perfect as I don't really like MySQL.
Sincerely, Momox
i was always a fan of tmysql4 and tbh i still am.. However support for it has gone in the trash so im forced to move to mysqloo however all my scrips will soon have an option to use one or the other
I've always used MySQLOO myself really and I've never had issues so I'd suggest it.