Vice Underdogs

Scripting => Script Showroom => Topic started by: stormeus on November 19, 2011, 06:22:31 am

Title: [Module] MySQL
Post by: stormeus on November 19, 2011, 06:22:31 am
MySQL ( lu_mysql )

This is a re-release of Juppi's lu_mysql module, which was never formally released. The module would allow you to connect to any MySQL database on any server, unlike SQLite, which restricts you to databases in the server folder. This module can allow you to update stats on a website, while maintaining another database on your server.

The only difference between this and Juppi's original code is a courtesy loading message, two more exceptions for connection failures, and it's been recompiled to work properly. The original module seemed to not compile correctly, and trying to use it would always result in a "Failed to retrieve UserData"

All the credit should go to Juppi for coding the vast majority of this great module. The list of functions provided are:

And will be available on the (LU) wiki ASAP.

Installation
Extract lu_mysql.dll/so to your Modules folder, and libmysql.dll to the same folder as the server (if you're using Windows). Load the module and you should be good to go.

Download
Windows Binary (http://www.mediafire.com/?2q35c166blj9jvs)
Linux Binary (http://www.mediafire.com/?d0v2vlq9hss4wr9)
Source Code (http://www.mediafire.com/?c7czh34wzwnaz32)
Title: Re: [Module] MySQL
Post by: Thijn on November 19, 2011, 12:33:11 pm
Juppi's module worked fine on both windows and linux for me :P
Would be nice if you fix the query function.
If you query from the database and need multiple rows you get the first result normally (in a array),
but then if you want to loop trough the next result you get another array (thats good, I guess?) but with all null values.
Title: Re: [Module] MySQL
Post by: stormeus on November 19, 2011, 04:44:50 pm
Linux was giving me grief while compiling on Arch. I'll come back to that after I fix the row bug.
Title: Re: [Module] MySQL
Post by: stormeus on November 19, 2011, 07:47:34 pm
(https://viceunderdogs.com/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FoHQnG.png&hash=2e606473c7da45aa0cc1e8a1aec3fda689a95f58)
Good news, everyone!

Updated to fix multi-row bug.
An issue where mysql_fetch_field didn't re-seek for each row was fixed. If you don't understand that, just be glad that it's fixed.

Linux version compiled.
Not much else to say here.

Links updated in the first post.
Title: Re: [Module] MySQL
Post by: Charley on December 17, 2011, 03:53:07 pm
Stickied