tiag0_bn
Well-Known Member
- Joined
- Dec 8, 2011
- Messages
- 181
- Reaction score
- 50
I have a script that find for items, but the house part is different from where it is recorded in my database, I need help to put it to search for house items
structure of the table where it writes in download (tile_store.sql)
thx for help
Lua:
local hi = db.getResult("SELECT `tile_id`, `count` FROM `tile_items` WHERE `itemtype` = "..item_id),{}
if (hi:getID() ~= -1) then
repeat
local tile = db.getResult("SELECT `house_id`, `x`, `y`, `z` FROM `tiles` WHERE `id` = "..hi:getDataInt("tile_id")),{}
tile_items[#tile_items+1] = {tile:getDataInt("house_id"),tile:getDataInt("x"), tile:getDataInt("y"),tile:getDataInt("z")}
until not(hi:next())
hi:free()
end
structure of the table where it writes in download (tile_store.sql)
thx for help
Attachments
-
tile_store.sql1.2 KB · Views: 0 · VirusTotal