[Standalone] OxMySQL - Lightweight MySQL wrapper

How to use semicolon-separated format for the password?

the transfer from mysql to oxmysql, was pretty easy going.
However have a few scripts still messing up.
Tried looking at the documentation but unsure how to re code this so it works with ox, as i didnt see a fetchAll thing on the .com
Thanks in advance.

Has nothing to do with mysql, beyond the fact that a query was performed.
That’s an error occurring in core_multijob, because it is… concatenating a nil value… as it says.

If the error didn’t occur with mysql-async, it’s more likely a result of uncaught errors due to yielding in a function reference. With mysql-async many errors will not throw an error, but you may see a random empty line in the console.

1 Like

okay thank you for reply!

Could not find dependency /server:5104 for resource oxmysql.

Hello,

I imagine this question has been asked 1000 times, but I need to be sure.

As I understand it, oxmysql provides mysql-async

provide ‘mysql-async’

So I just have to launch the oxmysql resource and stop mysql-async, without modifying the fxmanifest.lua of my old scripts?
Is it backwards compatible?

Is it backwards compatible?

It is.

Remove your mysql-async folder, drop in oxmysql and it will work.

Can someone help please I don’t know what happen everything was working fine and I flew in for some test and now when I open the players inventory nothing comes up and can’t move have to restart qb-inventory just to walk around again this is the new error I’ve noticed

Hello,
Do you know why this simple query is taking so long to execute?
Do you know how to optimize it ?

exports.oxmysql:execute('SELECT * FROM abyssin WHERE angora=@angora',
        {['angora'] = angora}, function(result)
            if result[1] ~= nil then 
                for i=1, #result, 1 do
                    table.insert(tablex, {
                        title = result[i].title,
                        cat_link = result[i].cat_link,
                        charidentifier = result[i].charidentifier,
                        id = result[i].id,
                    })
                end
            end

:oxmysql] [DEBUG] took 0.741052ms to execute a query!

You’re really complaining about 741052 nanoseconds?

If this response time seems acceptable to you, I’m not going to complain about it.

thank you for reassuring me, and thank you for your work.

1 Like

Shit escrowed script has an error, go speak to them.

1 Like

I get this one error in the script im not home to show but i need help

Good thanks working on my VDS server

I have this problem, how do I fix it?

can someone help me how to fix this?

is there a way where i can get a single row from a database table at random?

MySQL.single.await("SELECT column FROM table ORDER BY RAND()")
or
MySQL.query.await("SELECT column FROM table ORDER BY RAND() LIMIT 1") should be the same thing

source: How to request a random row in SQL? - Stack Overflow