Hello,
i have a table with following columns (in this order)
keyword, uid, area
but when i pull from database, they are in different order
area, keyword, uid
seems, that they are "pulled out" by alphabetical order.
the query i am using:
SELECT keyword, uid, area FROM mytable
can i fix this problem? the solution at the moment is to sort them
local destinations = db:rows(query)
local sorted = {}
for k, v in ipairs(destinations) do
table.insert(sorted, { v["keyword"], v["uid"], v["area"] })
end
i have a table with following columns (in this order)
keyword, uid, area
but when i pull from database, they are in different order
area, keyword, uid
seems, that they are "pulled out" by alphabetical order.
the query i am using:
SELECT keyword, uid, area FROM mytable
can i fix this problem? the solution at the moment is to sort them
local destinations = db:rows(query)
local sorted = {}
for k, v in ipairs(destinations) do
table.insert(sorted, { v["keyword"], v["uid"], v["area"] })
end