Author Topic: Juppi's MySQL Module (lu_mysql)  (Read 43756 times)

stormeus

  • No-Lifer
  • Developer
  • Full Member
  • *****
  • Posts: 112
  • Karma: +13/-2
    • View Profile
Juppi's MySQL Module (lu_mysql)
« on: November 19, 2011, 07:21:39 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:
  • mysql_connect( szHost, szUsername, szPassword, szDatabase, iPort )
  • mysql_close( pConnection )
  • mysql_query( pConnection, szQuery )
  • mysql_num_rows( pResult )
  • mysql_num_fields( pResult )
  • mysql_fetch_row( pResult )
  • mysql_fetch_assoc( pResult )
  • mysql_fetch_lengths( pResult )
  • mysql_free_result( pResult )
  • mysql_errno( pConnection )
  • mysql_error( pConnection )
  • mysql_ping( pConnection )
  • mysql_escape_string( pConnection, szString )
  • mysql_select_db( pConnection, szDatabase )
  • mysql_change_user( pConnection, szUser, szPassword )
  • mysql_warning_count( pConnection )
  • mysql_affected_rows( pConnection )
  • mysql_insert_id( pConnection )
  • mysql_info( pConnection )

Some functions are already on the wiki.

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
Linux Binary (MySQL 5.1)
Linux Binary (MySQL 5.5)

Source Code
« Last Edit: August 19, 2013, 02:35:19 am by stormeus »
Quote
Morphine says:
    them LU devs ranting about how LU doesn't have client pickups
    while us VC:MPers don't have client anything
    ;_;

Stormeus Argo says:
    we have client crashes though
    ohohohohoho

Morphine says:
    LU DOESN'T HAVE THAT

Stormeus Argo says:
    LU - 0
    VC:MP - 1

VetalYA

  • Guest
Re: Juppi's MySQL Module (lu_mysql)
« Reply #1 on: November 19, 2011, 11:32:26 am »
Perfect, just perfect ! Big thank.  ;)

AdTec_224

  • Developer
  • Newbie
  • *****
  • Posts: 36
  • Karma: +3/-5
    • View Profile
Re: Juppi's MySQL Module (lu_mysql)
« Reply #2 on: November 19, 2011, 05:29:17 pm »
Linux Version: Here (link removed)

Compiled using the source code in the first post and the Makefile from Juppi's original source.

- AdTec_224
« Last Edit: November 19, 2011, 11:07:56 pm by AdTec_224 »

stormeus

  • No-Lifer
  • Developer
  • Full Member
  • *****
  • Posts: 112
  • Karma: +13/-2
    • View Profile
Re: Juppi's MySQL Module (lu_mysql)
« Reply #3 on: November 19, 2011, 07:47:24 pm »
Cool. My compiler isn't working properly, I'll add that link to the first post. Also, I'll try fixing the multi-row bug and compiling against Linux once I clear that up.

-- EDIT --
Updated
  • Fixed the module so that multiple rows don't push arrays of null. Should work properly, since it's a one-line fix.
  • Compiled against g++ for Linux. GCC wasn't good enough.
  • Removed a debug message I accidentally left in.

Links are in the first post. Bug reports and mirrors always appreciated.
« Last Edit: November 19, 2011, 08:40:31 pm by stormeus »
Quote
Morphine says:
    them LU devs ranting about how LU doesn't have client pickups
    while us VC:MPers don't have client anything
    ;_;

Stormeus Argo says:
    we have client crashes though
    ohohohohoho

Morphine says:
    LU DOESN'T HAVE THAT

Stormeus Argo says:
    LU - 0
    VC:MP - 1

Thijn

  • Tester
  • Sr. Member
  • ****
  • Posts: 531
  • Karma: +27/-16
    • View Profile
Re: Juppi's MySQL Module (lu_mysql)
« Reply #4 on: November 20, 2011, 04:27:56 pm »
  • Fixed the module so that multiple rows don't push arrays of null. Should work properly, since it's a one-line fix.
Thanks alot, I couldn't find the error myself :)

Aldo

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Juppi's MySQL Module (lu_mysql)
« Reply #5 on: December 07, 2011, 02:42:10 pm »
Mr.Storm can this be used with VCMP Squirrel?

VetalYA

  • Guest
Re: Juppi's MySQL Module (lu_mysql)
« Reply #6 on: December 07, 2011, 06:04:56 pm »
Mr.Storm can this be used with VCMP Squirrel?
Try it at least. I think it will work too.

stormeus

  • No-Lifer
  • Developer
  • Full Member
  • *****
  • Posts: 112
  • Karma: +13/-2
    • View Profile
Re: Juppi's MySQL Module (lu_mysql)
« Reply #7 on: December 07, 2011, 08:50:46 pm »
Mr.Storm can this be used with VCMP Squirrel?

Yes. Tested and works. LU and VC:MP modules are (for the most part) cross-compatible.
Quote
Morphine says:
    them LU devs ranting about how LU doesn't have client pickups
    while us VC:MPers don't have client anything
    ;_;

Stormeus Argo says:
    we have client crashes though
    ohohohohoho

Morphine says:
    LU DOESN'T HAVE THAT

Stormeus Argo says:
    LU - 0
    VC:MP - 1

Aldo

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Juppi's MySQL Module (lu_mysql)
« Reply #8 on: December 07, 2011, 09:32:27 pm »
Mr.Storm can this be used with VCMP Squirrel?

Yes. Tested and works. LU and VC:MP modules are (for the most part) cross-compatible.

Thank you Mr.Storm

Demi God

  • Newbie
  • *
  • Posts: 20
  • Karma: +1/-1
    • View Profile
Re: Juppi's MySQL Module (lu_mysql)
« Reply #9 on: December 26, 2011, 05:25:09 am »
Can someone upload Windows Binary using this
Most of all sites are currently blocked by my ISP for some reasons.
Liberty Unleashed daily user!
[DW] Clan owner!
[DW] || Battle-Grounds server owner!
Click here to join us!

Thijn

  • Tester
  • Sr. Member
  • ****
  • Posts: 531
  • Karma: +27/-16
    • View Profile
Re: Juppi's MySQL Module (lu_mysql)
« Reply #10 on: December 26, 2011, 02:40:20 pm »
Mediafire is blocked by your ISP?!
What crappy ISP do you have? o_O

here it is anyways: lu_mysql.win.zip - 802.0 KB

Demi God

  • Newbie
  • *
  • Posts: 20
  • Karma: +1/-1
    • View Profile
Re: Juppi's MySQL Module (lu_mysql)
« Reply #11 on: December 26, 2011, 04:37:02 pm »
Mediafire is blocked by your ISP?!


All popular Downloadable sites are blocked because a movie produced by them is going to get released today (Don 2).

lu_mysql.win.zip - 802.0 KB


Thanks
Liberty Unleashed daily user!
[DW] Clan owner!
[DW] || Battle-Grounds server owner!
Click here to join us!

Thijn

  • Tester
  • Sr. Member
  • ****
  • Posts: 531
  • Karma: +27/-16
    • View Profile
Re: Juppi's MySQL Module (lu_mysql)
« Reply #12 on: December 26, 2011, 06:13:29 pm »
a movie is going to be released, so they block all download sites? crap, what country do you live in man...

SugarD

  • Asshat Gaming Founder
  • Tester
  • Sr. Member
  • ****
  • Posts: 820
  • Karma: +37/-75
  • STOP IN THE NAME OF THE COLESLAW!
    • View Profile
    • Clan Xperience
Re: Juppi's MySQL Module (lu_mysql)
« Reply #13 on: December 27, 2011, 04:07:24 am »
They are probably trying to prevent network overload by being ***holes and not upgrading their stuff, but instead blocking any heavy traffic.

Sephiroth

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Juppi's MySQL Module (lu_mysql)
« Reply #14 on: December 27, 2011, 04:30:22 am »
a movie is going to be released, so they block all download sites? crap, what country do you live in man...



this sounds like straight communism

 

© Liberty Unleashed Team.