very thanks for you reply im resolve this problem with use sync request im added you librairy in my favorite for after
ps: promise include in new version mysql async ?
[Release] MySQL Async Library - 3.3.1
local p = MySQL.Async.fetchScalar("SELECT 1")
p:next(function (result)
print(result)
return "test"
end):next(function (result)
print(result)
error 'An error'
end):next(nil, function(err)
print(err)
return ""
end)
-- Synchronisation
promise.all({
MySQL.Async.execute('SELECT SLEEP(1)'),
MySQL.Async.fetchScalar('SELECT "test"'),
}):next(function (results)
print(json.encode(results))
end)