Hello people,

I spent the entire day on making a user friendly mysql connector! This version links to a database on my personal server and practically every query can be performed on it.
Exceptions can be read in the comments in the mysql_test.c.

I recommend not to make use of the database now for development, not that I care but it will be emptied every now and then. Feel free to use some queries on it, it's fully sql-injection sensitive grin. DROP and CREATE DATABASE won't work, and I would prefer you not to use DROP TABLE hiscores. There are other people who want to see what's in it wink.

Download:
litec-sql_0.1.zip


And A6?
I think it works fine for A6 as well, at least for now, if you convert it. If theres much animo for an easy to use c-script version, I'll make one. Vote in the poll.


The commands
There are three commands available:

Code:
int testdb_connect(STRING* username, STRING* password)

Will connect you to the database
returns 1 when succesfull

Code:
STRING* db_query(STRING* query)

Sends a query to the database
returns row(s), column(s) info, or an errormessage.
rows are separated by a comma (,), columns by a colon (:).

Code:
db_close()

Closes the connection

There is a forth, called db_connect and allows to connect to a different database, but this will be available in the future.


The next step
This said, I have another plan for you beloved 3dgs forumusers. If this is running well, I will open a register page for people to create their own personal test database. Give your username and password in the registration form, fill them in in your testdb_connect() function, and you're set!

I do like to know if you think this (and other features) will come in handy,so please take ten seconds to fill in the poll below.

Regards,

Joozey



The Poll
[redirect link to poll, can't make polls in user contributions]


The screens




--



Last edited by Joozey; 07/05/08 22:20.

Click and join the 3dgs irc community!
Room: #3dgs