A beginner will need advice with mysql plz

hello to the charitable souls who would help :slight_smile:

I’m trying to create a bleach script, that’s ok.
I’m trying to add a feature that would allow me to check and limit the amount of money the gang(s) can launder per day.
my problem is the following: I cannot understand despite the different documents and guides how to read my database from my server file, indeed I receive this error
server.lua (5.5 KB)
: @bmb_laundry/server.lua:116: attempt to index a nil value (field ‘Sync’)

I’m making you follow the script concerned, I’m usur that it’s me who’s wrong somewhere but I don’t understand or if someone wants to help, thank you in advance :slight_smile:

edit: I attached the server.lua file and the table in question that I created where I want to store the money values already laundered per day and per gang

sommetotalgang24h.sql (1.3 KB)

hello, i know im late but you should refer to this documentation, it shows you how to use oxmysql, you have to implement it in your fxmanifest, otherwiese it wont work, i looked through the code otherwise it seems good :smiley: also
try
MySQL.scalar.await
instead of
MySQL.Sync.fetchAll