MYSQL LUA Fetch Data [Need Assistance]

Alright, So I am currently working on a script to store data for vehicle damage and (This could also work with multiple other things if I can figure out how to do this) so I have the data stored, I am currently just having issues getting the data from the MYSQL into a client script, Now I have the data storying but its pulling that data and having that data used in a client.lua portion.

	MySQL.Async.execute('UPDATE owned_vehicles SET body = @body WHERE plate = @plate', {
		['@body'] = health,
		['@plate'] = plate
	}, function(rowsChanged)
		if rowsChanged == 0 then
			print(('esx_garagething: %s exploited the garage!'):format(xPlayer.identifier))
		end
	end)

This stores the data correctly, I just need to figure out how to get that data to the client.

It’s the same MySQL execute but instead of update you put SELECT. Read more into MySQL on the MySQL documentation website or stackoverflow or something.

So if I understand you correctly, what you need to do now, is create an event on client side, and then trigger that client event from the server.

client side:

RegisterNetEvent('nameOfYourEvent')
AddEventHandler('nameOfYourEvent',
  function(data)
    -- TODO
  end
)

Server side:

MySQL.Async.execute('UPDATE owned_vehicles SET body = @body WHERE plate = @plate', {
		['@body'] = health,
	        ['@plate'] = plate
	}, function(rowsChanged)
		TriggerClientEvent('nameOfYourEvent', source, rowsChanged)
	end)

Yea, pretty much I need the bodyhealth to pull from the database inwhich I have it stored.