function verileriAktar(sorgu, id)
local cevap = dbPoll(sorgu, 0) -- since it's ready to poll, timeout is irrelevant and can be 0
queries[id] = cevap
print("poll")
--return coroutine.resume(co[id], cevap)
end
function querydb(str,c)
if str:find("DROP TABLE") then return end
local id = getFreeID()
co[id] = coroutine.create(function()
cevap = dbQuery(verileriAktar,{id}, connection, str)
coroutine.yield()
end)
coroutine.resume(co[id])
if coroutine.status(co[id]) ~= "dead" then
if not coroutine.running() then
return id
end
end
end
local id = querydb("SELECT * FROM `kayitlar` WHERE `KullaniciAdi`='mahlukat'")
print("querydb: "..tostring(id))
local result = getQueryResult(id)
print("queryresult: "..tostring(result))
Occurred
Debug Monitor ;
print("querydb: "..tostring(id))
print("queryresult: "..tostring(result))
print("poll")
I want
Debug Monitor ;
print("poll")
print("querydb: "..tostring(id))
print("queryresult: "..tostring(result))
I want the pool value before the return, So the pool is on top.