1. Post #281
    Gold Member
    doonbugie2's Avatar
    May 2008
    7,387 Posts
    Compile it for linux.

  2. Post #282
    I'm Better Than You
    Dennab
    August 2008
    5,304 Posts
    Compile it for linux.
    Use MySQLOO.

  3. Post #283
    Gold Member
    MDave's Avatar
    April 2010
    629 Posts
    Please compile it for linux too!

  4. Post #284
    likes men
    Python1320's Avatar
    May 2007
    1,711 Posts
    Compile it for linux.
    Please compile it for linux too!
    I know this is an old module but I am trying to compile it for Linux.
    I receive the following errors when I compile in Linux.
    mysql.cpp:328:3: error: #error LINUX
    Can anyone help me out with this?
    Can someone kindly compile this for Linux? The new one is pretty bad imo.

    Linux support in this module:
    Code:
    #ifdef WIN32
    	HANDLE hThread;
    	HANDLE hWaitObject;
    	HANDLE hContinueObject;
    	DWORD dwThreadId;
    #else
    	#error LINUX!
    #endif
    Solution:
    Use MySQLOO.
    This requires porting your code to use mysqloo, but I assure you it's easier than rewriting this module.

  5. Post #285
    Gold Member
    MDave's Avatar
    April 2010
    629 Posts
    I hate the MySqlOO edition.

    It makes everything harder to do that it has a callback system. So not returning values immediately. And thats why this module is better.

    Are you sure it cant be compiled on linux?

  6. Post #286
    likes men
    Python1320's Avatar
    May 2007
    1,711 Posts
    MySQL is not instant. Especially with distant or overloaded servers. Would you really want the server to freeze while it's executing a query? I wouldn't. Callbacks are the only way. Learn to love them. It'll benefit in the long run.
    This can be *recoded* for Linux. I don't know anyone crazy (or bored) enough to do it though.
    Reply With Quote Edit / Delete Reply Finland Show Events Agree Agree x 1 (list)

  7. Post #287
    I'm Better Than You
    Dennab
    August 2008
    5,304 Posts
    This isn't threaded. Why would anyone want to use it?!
    Reply With Quote Edit / Delete Reply United Kingdom Show Events Agree Agree x 3Dumb Dumb x 1 (list)

  8. Post #288
    Gold Member
    aVoN's Avatar
    December 2005
    2,880 Posts
    I hate the MySqlOO edition.

    It makes everything harder to do that it has a callback system. So not returning values immediately. And thats why this module is better.

    Are you sure it cant be compiled on linux?
    Seriously, querying a database takes time. That's why MySQLOO uses a callback. This addon here having a return-value after a query just means, the whole game has to wait/hang before querying the database has finished.

    Also you can compile this Addon for linux if you just add the necessary parts. Some stuff already has been made "linux-compatible" but some aren't (WinSocks - LOL).

  9. Post #289
    Creator of Exsto
    Prefan's Avatar
    January 2009
    1,049 Posts
    I hate the MySqlOO edition.

    It makes everything harder to do that it has a callback system. So not returning values immediately. And thats why this module is better.

    Are you sure it cant be compiled on linux?
    mysqloo has a query:wait() if you really, REALLY don't want to use callbacks.

  10. Post #290
    Gold Member
    MDave's Avatar
    April 2010
    629 Posts
    mysqloo has a query:wait() if you really, REALLY don't want to use callbacks.
    Sure? I didn't saw it in the documentation.

  11. Post #291
    Gold Member
    Lexic's Avatar
    March 2009
    6,118 Posts
    Yes.

  12. Post #292
    Dragon Master's Avatar
    April 2010
    1,574 Posts
    Do I have to upload the files to my Game Server? because I'm not sure :saddowns:

  13. Post #293
    I'm Better Than You
    Dennab
    August 2008
    5,304 Posts
    Of course you do...

    This isn't threaded as I said in your other thread use tmysql or mysqloo.

  14. Post #294
    agmike's Avatar
    September 2010
    120 Posts
    It actually is threaded if you get the right version, but keep telling people it's not despite the fact that it is and don't read the rest of the thread pages, just assume whatever you want ignorantly.

  15. Post #295
    I'm Better Than You
    Dennab
    August 2008
    5,304 Posts
    Not really threaded if it still returns a value straight to Lua. Lua has to stop and wait for MySQL to return a result until it carries on.

  16. Post #296
    agmike's Avatar
    September 2010
    120 Posts
    No, if you actually read it it returns the threadid right away and you check when the job is finished, it's no different than passing a function and getting results, there's still a waiting period before you can get results back and you could even make a snazzy wrapper that enables you to pass a function to get the return data, but obviously nothing will appeal to your personal standards so it's a POS.

  17. Post #297
    diaoyudao shi ZHONGGUO de
    Disseminate's Avatar
    December 2007
    4,025 Posts
    Or you could just use the latest version of mysql which uses callbacks

  18. Post #298
    I'm Better Than You
    Dennab
    August 2008
    5,304 Posts
    No, if you actually read it it returns the threadid right away and you check when the job is finished, it's no different than passing a function and getting results, there's still a waiting period before you can get results back and you could even make a snazzy wrapper that enables you to pass a function to get the return data, but obviously nothing will appeal to your personal standards so it's a POS.
    So you still have to wait for the value by checking it nearly ever millisecond? MySQLOO's callbacks are still faster, plus it uses the latest LibMYSQL which makes it: faster, more compatible and less buggy plus MySQLOO can be used on Linux.

  19. Post #299

    June 2010
    53 Posts
    HELP ME!!!!
    [[Take the libmySQL.dll, and put it in the same directory as HL2.EXE (ie: c:\program files\valve\steam\steamapps\username\garrysmod)]]


    ok i have a Srcds server
    so does that mean i have to put the file libmySQ.dll somewhere in the C:\srcds\orangebox...FILES
    if i do need to put in in there could u tell me were
    Reply With Quote Edit / Delete Reply United States Show Events Dumb Dumb x 3 (list)

  20. Post #300
    agmike's Avatar
    September 2010
    120 Posts
    Yes, wherever you see srcds.exe

    Also, anything can work on linux if you don't design it to only use proprietary M$ crap. And sometimes, even then (mono).

  21. Post #301
    michaelh's Avatar
    June 2009
    71 Posts
    Not really threaded if it still returns a value straight to Lua. Lua has to stop and wait for MySQL to return a result until it carries on.
    Threaded != asynchronous

    Hooks are asynchronous. Threads can assist making applications asynchronous. Threads alone do not make applications asynchronous (such as if the application is waiting for a thread to finish a task).

    Edit:
    Hurr. Head not screwed on right. What I meant was:
    Threads are always asychronous, but many applications using threads are not, as they are joining threads to block the main thread until a child thread returns a result. This makes the applications synchronous, since the program has been stopped to wait for the result of the thread.
    Reply With Quote Edit / Delete Reply United Kingdom Show Events Dumb Dumb x 1Agree Agree x 1 (list)

  22. Post #302
    SL1CHAOS's Avatar
    December 2009
    274 Posts
    where do you put the libmysql.dll when your on srcds, does it go into C:\srcds\orangbox\garrysmod
    or C:\srcds\orangbox

  23. Post #303
    CTCCoco's Avatar
    December 2008
    29 Posts
    mysqloo has a query:wait() if you really, REALLY don't want to use callbacks.
    How query:wait() works? How I can use it?

    Thanks for help.

  24. Post #304
    _axe_'s Avatar
    May 2007
    376 Posts
    )[*]Take the libmySQL.dll, and put it in the same directory as HL2.EXE (ie: c:\program files\valve\steam\steamapps\username\garrysmod)

    How to solve this for dedicated servers? Or doesnt this work on dedicated servers?

    Edited:

    Ow snip, just found out

    Source Dedicated Server put libmySQL.dll in the same place as your srcds.exe
    EX:
    c:\srcds\orangebox\Garrysmod\
    c:\srcds\orangebox\srcds.exe
    c:\srcds\orangebox\libmySQL.dll

    Thanks for this nice addon!!

  25. Post #305
    I'm a tool
    KillerLUA's Avatar
    June 2009
    1,323 Posts
    Since this freezes the server, will this stop the server processing anything for the duration of the query request, is that going to cause any large problems?

    Could it cause timer's to not tick at the correct time?

    Just a question
    Reply With Quote Edit / Delete Reply Windows Vista United Kingdom Show Events Dumb Dumb x 1 (list)

  26. Post #306
    xmathewx75's Avatar
    April 2010
    452 Posts
    Sorry for bumping, but can you please fix your download links? They don't seem to work.

  27. Post #307
    Gold Banana
    Banana Lord.'s Avatar
    May 2010
    6,423 Posts
    use MySQLOO
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Agree Agree x 2Informative Informative x 1 (list)

  28. Post #308
    lua_error's Avatar
    June 2011
    217 Posts
    MySQLOO works with Linux?
    Reply With Quote Edit / Delete Reply Windows 7 Ukraine Show Events Dumb Dumb x 1Agree Agree x 1 (list)

  29. Post #309
    Gold Banana
    Banana Lord.'s Avatar
    May 2010
    6,423 Posts
    MySQLOO works with Linux?
    if it doesn't then I'm not sure what my server has been running on :O
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Funny Funny x 1Zing Zing x 1 (list)

  30. Post #310
    zzaacckk's Avatar
    June 2009
    2,140 Posts
    Can someone upload a mirror for this please?
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Dumb Dumb x 2Agree Agree x 1 (list)

  31. Post #311
    Map in a box's Avatar
    July 2009
    7,004 Posts
    You could use tmysql or the new mysql module.
    Reply With Quote Edit / Delete Reply Windows XP United States Show Events Zing Zing x 1Dumb Dumb x 1Agree Agree x 1 (list)

  32. Post #312
    taste the salty dong
    Remscar's Avatar
    September 2009
    1,821 Posts
    Can someone upload a mirror for this please?
    I don't know, i might. But then again, you spout slander that i "copy formatme's code". Which is ironic, since formatme doesn't code.
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Dumb Dumb x 1Informative Informative x 1 (list)

  33. Post #313
    itkuitkzhji's Avatar
    April 2012
    92 Posts
    Reupload please. -_-

  34. Post #314
    PROUD BRONY 4LYFE
    Drakehawke's Avatar
    February 2009
    3,312 Posts
    Reupload please. -_-
    You'd be better off using mysqloo - http://facepunch.com/showthread.php?t=933647
    Reply With Quote Edit / Delete Reply Windows 7 United Kingdom Show Events Friendly Friendly x 1 (list)

  35. Post #315
    itkuitkzhji's Avatar
    April 2012
    92 Posts
    Thank you. ^_^