[REQ] MYSQL / MYSQLi support

You can talk about ManiaScript for ManiaPlanet here

Moderator: English Moderator

User avatar
w1lla
Posts: 2287
Joined: 15 Jun 2010, 11:09
Location: Netherlands
Contact:

[REQ] MYSQL / MYSQLi support

Post by w1lla »

Hi,

Hope this can be arranged. Not by doing this through a http request in maniascript but by adding mysql/mysqli support to maniascript.

This way you can write selfmade libraries to a certain database on your own server and still keep all data in your own pocket.

with kind regards,

w1lla.
TM² Info
SM Info
QM Info

OS: Windows 10 x64 Professional
MB: MSI 970A-G46
Processor: AMD FX-6300 3500 mHz
RAM Memory: 16 GB DDR3
Video: SAPPHIRE DUAL-X R9 280X 3GB GDDR5
KB: Logitech G510s
Mouse: Logitech G300s
Mode Creation
ManiaScript Docs
User avatar
alividerci
Posts: 363
Joined: 11 Feb 2012, 07:03

Re: [REQ] MYSQL / MYSQLi support

Post by alividerci »

Good idea, i think.
User avatar
djhubertus
Translator
Translator
Posts: 1097
Joined: 09 Jul 2012, 18:30
Location: Poland
Contact:

Re: [REQ] MYSQL / MYSQLi support

Post by djhubertus »

+1 But it was requested several times without results :/
My Gamemodes:
MP4 - Countdown, Firefight
MP3 - Reduction, Overload, Flashpoint, Territory, SM Race, Escape
MP2 - Search & Destroy, Oscillation, Instagib
reaby
Posts: 956
Joined: 29 Dec 2010, 23:26
Location: Eastern Finland
Contact:

Re: [REQ] MYSQL / MYSQLi support

Post by reaby »

i don't understand where possible one could need mysql support in maniascript, since i can't imagine any use case.

why can't you just use httpManager for basic io transport for db -> if you intend it to run on localhost ?
User avatar
djhubertus
Translator
Translator
Posts: 1097
Joined: 09 Jul 2012, 18:30
Location: Poland
Contact:

Re: [REQ] MYSQL / MYSQLi support

Post by djhubertus »

reaby wrote:i don't understand where possible one could need mysql support in maniascript, since i can't imagine any use case.
For example to build global tops, to save some data.

Amxx(Counter-Strike mod) bring Mysql support and it's used in thousands of scripts. For example, I made COD:MW 3 mod with level progression and in-game class creator. It uses mysql to collect data and for example build website with this.
My Gamemodes:
MP4 - Countdown, Firefight
MP3 - Reduction, Overload, Flashpoint, Territory, SM Race, Escape
MP2 - Search & Destroy, Oscillation, Instagib
User avatar
TGYoshi
Posts: 795
Joined: 15 Mar 2011, 16:59

Re: [REQ] MYSQL / MYSQLi support

Post by TGYoshi »

For server-sided scripts you can emit xmlrpc events, which can handle database stuff. For client-sided scripts you really don't want to put your database server details in the script...

Also, MySQLi is a PHP library, completely unrelated to a ManiaScript lib.

ManiaScript first really needs proper data structure support anyway, you can't define custom structures yet (which nearly every language supports).
=3
User avatar
djhubertus
Translator
Translator
Posts: 1097
Joined: 09 Jul 2012, 18:30
Location: Poland
Contact:

Re: [REQ] MYSQL / MYSQLi support

Post by djhubertus »

TGYoshi wrote:For server-sided scripts you can emit xmlrpc events, which can handle database stuff. For client-sided scripts you really don't want to put your database server details in the script...
Yea, but not all servers have xml-rpc enabled/have troubles with sending.
My Gamemodes:
MP4 - Countdown, Firefight
MP3 - Reduction, Overload, Flashpoint, Territory, SM Race, Escape
MP2 - Search & Destroy, Oscillation, Instagib
User avatar
TGYoshi
Posts: 795
Joined: 15 Mar 2011, 16:59

Re: [REQ] MYSQL / MYSQLi support

Post by TGYoshi »

And you expect them to be able to run a mysql server instead?
=3
User avatar
djhubertus
Translator
Translator
Posts: 1097
Joined: 09 Jul 2012, 18:30
Location: Poland
Contact:

Re: [REQ] MYSQL / MYSQLi support

Post by djhubertus »

TGYoshi wrote:And you expect them to be able to run a mysql server instead?
For some reasons yes and for some reasons no. We can build huge discussion similar to question "Is being positive is better than being negative." but is it really worth time to discuss about opinions what someone like more?

In my previous post I should bold "have troubles with sending". Mysql in my personal opinion is easier to use than xml-rpc and propably someone on this forum will post "xml-rpc is ultra easy."

If devs will not introduce mysql, I will not cry :) It's only a suggestion/wish.
My Gamemodes:
MP4 - Countdown, Firefight
MP3 - Reduction, Overload, Flashpoint, Territory, SM Race, Escape
MP2 - Search & Destroy, Oscillation, Instagib
User avatar
TGYoshi
Posts: 795
Joined: 15 Mar 2011, 16:59

Re: [REQ] MYSQL / MYSQLi support

Post by TGYoshi »

There exist libs to handle all magic for you, just like how you use MySQLi to handle all php <-> mysql server communication.
Although, I'll have to say Nadeo made a huuuuuuge mess of the xmlrpc communication, complicating communication for no reason.

I do like the idea of a database though, but a serverless database (SQLite?) is likely much more convenient since MySQL requires a bunch of stupid setup steps.

My point is more that there are other things which should be done first no matter what. It's impossible to define a custom structure like a common struct (either statically/compile time determined (e.g. C) or runtime/dynamic ones (e.g. JS)), so reading/writing database results in ManiaScript is will be huge pain already...

Adding features like structs to ManiaScript (and severely improving the performance) is one of the essential things to make it a somewhat decent language.
I feel sorry for the guy who wrote the Animations lib for ManiaScript, what a mess thanks to the fact that custom structures aren't possible :D.
=3
Post Reply

Return to “ManiaScript”

Who is online

Users browsing this forum: No registered users and 1 guest