MySQL.Async.fetchAll with javascript

I’ve been trying to make the code work for a very long time, but it doesn’t work. Anyone know why?

let ESX = null;
emit("esx:getSharedObject", (obj) => ESX = obj);

onNet("getAllUser", () =>{

	
	var rs = [];
	
	MySQL.Async.fetchAll("SELECT * FROM users", (result) => {
		
	  rs = result;
	  
	});
	
	emitNet("resp:X", source, rs);

})

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.