mysqloo

Worked before for me, but now when a query runs, it runs it but doesn’t run function on onSuccess.

grrr getting frustrated atm off it.
Anyone any thoughts why It runs the query but not runs the onSuccess?

I like MySqloo, but it seems like it’s half broke atm… Try tmysql

tmysql any stable? and a link somewhere?

Are you sure the query is even working? Use onFailure and onError to ensure that. It’s not half buggy by the way, it works perfectly fine.

[editline]03:38PM[/editline]

[lua]
local MyQuer = database:query(“query”)
MyQuer.onSuccess = function() print(“Woo, Query worked!”) end
MyQuer.onFailure = function(Q,F) print("Query Failed :frowning: Error: "…F) end
MyQuer.onError = function(Q,F) print("Query Error’d :frowning: Error: "…F) end
MyQuer:start()[/lua]

Yeah I thought so to, in the beginning worked, don’t understand why i’m restarting my gamemode it doesn’t work.
OnFailure and onError don’t run anything and the query is run, cause the database is updated when I use insert, just doesn’t run the onSuccess function or on failure and all

use Query:onData to check if any data is being recieved.

onData does’t show anything neither

Are you even telling the query to start? While you’re at it, post your code below.

This is my mysql.lua file

That (in my opinion) is a tad elaborate, but eh. Just a few pointers-

[list=]
[li]You don’t need to call wait, the connection should automatically sleep when it’s not in use.[/li][li]Needs more onError / onFailure (in my opinion, just for the sake of debugging if needs be)[/li][/list]

The only thing I can really see wrong there is that your query may be incorrect.

I added both the onError,onFailure, If my query is incorrect, then why does it execute it?

-snip-

If you say it’s because of no Data is returned, then how can you check is query is successfull but just not data returned?
Also when it should return a row, it still doesn’t execute the onSuccess function

Well why onSucess isn’t being called I don’t know. It should call one of three (four if you include onData), those being onSuccess, onError and onFailure. Only suggestion I can think of is reinstall the modules.

I’ll try that, but strange that it actually executes the query but not return success as it should

[editline]06:10PM[/editline]

Tried my old code and new, both give same problem, the mysql module is prolly broken due to last garrysmod update

I Really could use a fix so I can use mysql, cause I really really need mysql

MySQLOO broke entirely for me, refuses to connect no matter what.

Hmm seems strange, My code also worked a week or two ago, now it seems its also broken.
It exectes queryies but doesn’t run the onSuccess one, strange!
hope someone can fix this or that andy comes online!

MySQLOO is just a horrible module, hardly works. I recommend using gm_tmysql from AzuIsLeet, it works perfectly and it connects without a hitch, I use it on all my servers.

But is it easy to use? and stable? Any tutorials? examples? and where can I find latest?