I am having a problem with displaying a list of images and text from an SQLite query. I use the following syntax:
local t = display.newText(text, 20, 30 * row.id, null, 16)
It works perfectly but, I am unable to sort the content so that it will display a list with the latest item on top.
I have tried sorting in the SQL query ORDER BY DESC, but it is not working.
Also I have placed the results of the query in a Lua table and like this:
local t = table
for i = #t, 1, -1 do
var = t[i]
end
When printing the var I get perfect backward sorting, but not when rendering the text elements with *row.id or *var
What am I doing wrong? Any help is greatly appreciated. Thanks.