[Standalone] OxMySQL - Lightweight MySQL wrapper

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

having issue with not having a premissions table in data base for oxmysql

if anyone can help that would be amazing, im newer to coding as well so idk how to set up said table right

How can i config the collate? I got some Exceptions that means

[ script:oxmysql] Error: esx_vehicleshop was unable to execute a query!
[ script:oxmysql] Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8mb4_general_ci,IMPLICIT) for operation ‘=’
[ script:oxmysql] SELECT rented_vehicles.owner, rented_vehicles.rent_price, rented_vehicles.plate, users.accounts FROM rented_vehicles LEFT JOIN users ON rented_vehicles.owner = users.identifier []

I figured out that esx use “UTF8MB4_UNICODE_CI” and oxmsql uses “UTF8MB4_GENERAL_CI”. In build.js is an export for that but I don’t know how to config it that it will exports the correct collate? General = 45 and UNICODE = 224

oxmysql doesn’t use anything. Your tables are using separate collations, you need to alter everything and the database to use the correct one (utf8mb4_unicode_ci being the preferred choice).

1 Like

sorry, you are right, thanks for pointing me to that issue in my database :slight_smile:

oxmysql/lib/MySQL.lua:125: No such export awaitConnection in resource oxmysql

jai le meme probleme que fair

Have you found a way to fix this?

I changed The IP Address And The Ports To My Ones

[ script:esx_property] SCRIPT ERROR: @oxmysql/lib/MySQL.lua:63: No such export query in resource oxmysql

Thats my problem i dont know what i did wrong.