Facepunch / garrysmod-requests

Feature requests for Garry's Mod
85 stars 24 forks source link

MySQL Integration #225

Closed 8BallBomBom closed 1 year ago

8BallBomBom commented 10 years ago

I know this is a long shot. It has been requested before but would it be possible to get a built in MySQL solution? The only reason I'm asking is due to the fact almost every serious server uses a MySQL database.

If possible could we have something like MySQLOO but less buggy please.

I'm sure there's many who support this.

8BallBomBom commented 10 years ago

The bugs have already been mentioned in the latest MySQLOO thread and they still exist after the release 2 months ago.

Lexicality commented 10 years ago

You should probably complain on KingofBeast/gmsv_mysqloo in that case? Or fork it and fix them yourself.

8BallBomBom commented 10 years ago

I suppose so but it still doesn't get past the fact almost everyone uses MySQL and it should maybe become a built in feature.

8BallBomBom commented 10 years ago

I thought it was obvious this would be a dedicated server only feature even though I'm fairly sure hardly anything in gmod or nothing at all in gmod is a dedicated server only feature.

TeddiO commented 10 years ago

+1 to this if we can have a solid implementation that remains updated over time. mySQL or an object compatible with multiple db types) would be awesome to have.

Acecool commented 10 years ago

I actually like the idea; I think if a MySQL binary like TMySQL was integrated it would make so many lives easier. It wouldn't be too difficult to do, and since it's built-in it would have an easier time with being updated should the need arise.

https://dl.dropboxusercontent.com/u/26074909/tutoring/database/_connecting_with_fallbacks_in_place.lua.html

https://dl.dropboxusercontent.com/u/26074909/tutoring/database/_connecting_with_mysqloo.lua.html

https://dl.dropboxusercontent.com/u/26074909/tutoring/database/_connecting_with_tmysql.lua.html

8BallBomBom commented 10 years ago

Maybe something like this? http://www.keplerproject.org/luasql/

Banhfunbags commented 10 years ago

TMySQL is less laggy that MySQLOO.

8BallBomBom commented 10 years ago

That may be true, but if this functionality was to be built into garrysmod then surely people would want multiple connection and database support?

As far as i'm aware TMySQL doesn't have that support without disconnecting and reconnecting constantly.

I wouldn't want to grab multiple databases and dump them all in 1 database. If TMySQL already had that functionality then i'd have possibly been using it a long time ago.

TeddiO commented 10 years ago

tmySQL4 supports multiple connections, look at blackawps's implementation of it.

Acecool commented 10 years ago

And the connections are persistent. No need to reconnect. The server does crash if you have an error in your SQL though; so make sure you escape any user input ( never trust it anyway ), and make sure your syntax is correct. I personally made a system to generate queries based on tables I need to link, and data needed etc.

TeddiO commented 10 years ago

Never had a crash issue with tmysql4 and invalid sql queries, however that's not really relevant to this request so lets keep it more on track :+1:

Acecool commented 10 years ago

I haven't on my game-mode either; but I've seen it happen to other game-modes where it crashed because the sql was wrong which broke the hook. But yeah; never losing connection is a nice feature!

Kefta commented 9 years ago

tMySQL was updated to be way more functional and stable, and doesn't create a bunch of internal junk like MySQLOO. Think this can be closed

kklouzal commented 9 years ago

I tried a couple years ago to get this implemented.

I just assume the devs would want to do it themselves at this point so they can make it as efficient as possible with some documentation. I mean, everything aside from Sandbox uses MySQL. That's a huge chunk of the players!

https://github.com/Facepunch/garrysmod-requests/issues/37