Nothxbye
Banned User
- Joined
- Jan 22, 2012
- Messages
- 1,124
- Reaction score
- 174
Hello Guys,
I've got a question. It's possible to get more than 1 result in one time using "db.getResult"?
For example i want to get EVERY house id if someone is owner in one script exute.
I tried with loop and insert it to table but doesn't work for me, like here:
Is possible to get that effect in another way? Or same way but correct.
I've got a question. It's possible to get more than 1 result in one time using "db.getResult"?
For example i want to get EVERY house id if someone is owner in one script exute.
I tried with loop and insert it to table but doesn't work for me, like here:
Code:
for i = 1, 3 do
local result = db.getResult('SELECT `id` FROM `houses` WHERE `owner` > 0)
end
local tbl = {}
table.insert(tbl, result:getDataInt("id"))
Is possible to get that effect in another way? Or same way but correct.