mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-01 22:21:51 +00:00
fix: Parameter parsing, new update export, null parameter warning
- fix https://github.com/overextended/oxmysql/issues/14 - fix ? https://github.com/overextended/oxmysql/issues/16 - fix https://github.com/overextended/oxmysql/issues/15
This commit is contained in:
3 files changed
+173
-76
No files matched your search
+19
-3
@@ -1,10 +1,10 @@
|
||||
---
|
||||
-- Execute query and fetch affected rows
|
||||
-- Execute unprepared query and fetch result
|
||||
--
|
||||
-- @param query tring
|
||||
-- @param parameters table
|
||||
--
|
||||
-- @return table with result
|
||||
-- @return table with result | false
|
||||
--
|
||||
exports('executeSync', function(query, parameters)
|
||||
local p = promise.new()
|
||||
@@ -76,4 +76,20 @@ exports('insertSync', function(query, parameters)
|
||||
p:resolve(result)
|
||||
end, GetInvokingResource())
|
||||
return Citizen.Await(p)
|
||||
end)
|
||||
end)
|
||||
|
||||
---
|
||||
-- Update data and return affected rows
|
||||
--
|
||||
-- @param query tring
|
||||
-- @param parameters table
|
||||
--
|
||||
-- @return number affected rows
|
||||
--
|
||||
exports('insertSync', function(query, parameters)
|
||||
local p = promise.new()
|
||||
exports['oxmysql']:update(query, parameters, function(result)
|
||||
p:resolve(result)
|
||||
end, GetInvokingResource())
|
||||
return Citizen.Await(p)
|
||||
end)
|
||||
Reference in new issue
Block a user