Hi, I want to print the matching value but I can't
Can you help, thank you ...
server.Lua
local vehDB = dbConnect( 'sqlite', 'vehicle.db' )
dbExec(vehDB,' CREATE TABLE IF NOT EXISTS `vehicle_base` (pAcc, vehicleID, vehicleName, vehiclePrice, vehicleStatus, vehicleHP)')
function dategetV()
local results = dbPoll(dbQuery(vehDB, "SELECT * FROM `vehicle_base` WHERE vehicleID=? AND pAcc=?",520,getAccountName(getPlayerAccount(source))), -1)
if results then
for k,v in ipairs ( results ) do
outputDebugString(tostring(v['vehicleHP']))
end
end
end
addEvent("dategetV", true)
addEventHandler("dategetV", getRootElement(getThisResource()), dategetV)