[Release] MySQL Async Library - 3.0.8

dev
mysql
basemods

#527

I do not understand you suggest.


#528

Run this query in your database, it should fix your issue. An index over both rows that are queried in your WHERE statement solves the issue.


#529

I do not have much knowledge. I just started. Would you like to suggest a step-by-step solution?

for i=1, #xPlayer.inventory, 1 do

  if ESX.LastPlayerData[xPlayer.source].items[xPlayer.inventory[i].name] ~= xPlayer.inventory[i].count then

  	table.insert(asyncTasks, function(cb)
  		MySQL.Async.execute('UPDATE user_inventory SET `count` = @count WHERE identifier = @identifier AND item = @item',
  		{
  			['@count']      = xPlayer.inventory[i].count,
  			['@identifier'] = xPlayer.identifier,
  			['@item']       = xPlayer.inventory[i].name
  		}, function(rowsChanged)
  			cb()
  		end)
  	end)

  	ESX.LastPlayerData[xPlayer.source].items[xPlayer.inventory[i].name] = xPlayer.inventory[i].count

  end

end


#530

It literally is a step-by-step solution, just run the given query.


#531

image


#532

I’m grateful for the help.


#533

Now it should be quick. :slight_smile: enjoy.


#534

I will monitor the situation. Will there be a faster update?


#535

yes, because it is indexed now. it does not need to search the entire table for the appropriate rows.


#536

I just installed the last version, but every time i start the server this error comes out… what can I do to fix it?

Error loading script mysql-async.js in resource TODO: TypeError: global.exports is not a function

stack:

TypeError: global.exports is not a function

at Object.<anonymous> (mysql-async.js:4979:8)

at webpack_require (mysql-async.js:20:30)

at mysql-async.js:84:18

at mysql-async.js:87:10

Failed to load script mysql-async.js.


#537

Delete your cache and try again.


#538

My reuserver hangs on the server. The server can not print or do anything.


#539

Would you please write proper english sentences?

I do not understand what your issue is.


#540

obviously his reuserver hangs on the server. The server can not print or do anything. Duh…


#541

I just installed the latest version and I am getting this error, I used to use your older version a few months back before I got busy with work, I started fresh and deleted and updated everything for my server, but now I am getting this and it will not start. I’ve been trying to fix it my self not sure how.

This is what i put in server.cfg not sure if its changed.
set es_enableCustomData 1
set mysql_connection_string “server=127.0.0.1;database=essentialmode;userid=root;password=password”

Error loading script mysql-async.js in resource TODO: TypeError: global.exports is not a function
stack:

TypeError: global.exports is not a function

at Object. (mysql-async.js:4979:8)

at webpack_require (mysql-async.js:20:30)

at mysql-async.js:84:18

at mysql-async.js:87:10

Failed to load script mysql-async.js.

#542

Uuhm which server artifacts are you using? @Autry


#543

October 18th 2018 release, I think it might be my couch db i just notice it was outdated? possibly @Syntasu


#544

Uuuh that should be fine, weird that it doesn’t recognize those global.exports calls, maybe something @zr0iq might need to take a look at.

Or could you make a log of your server output, there might be more to the story here.


#545

Yeah probably sucks too am in the middle of a deadline lol, but it is what it is once its fixed or find a fix I will set it up thanks though @Syntasu


#546

Please provide a server log :slight_smile:

If you are on windows, use this:

../artifacts/run.cmd +exec server.cfg > output.txt 

Basically append the > output.txt part and run the server for like 30 seconds.