Hi,
I am dealing with my first tableview displaying a list of user generated data. This data get saved on a sqlite table.
Everything so far is saved and rendered pretty well. But since I’m new both to sqlite and corona I’m not able to get the indexing properly in order to get the newest row added on top of list instead of at the bottom.
Here’s how I set the sqlite table:
local path = system.pathForFile("db.sqlite", system.DocumentsDirectory); local db = sqlite.open(path); db:exec("CREATE TABLE IF NOT EXISTS info (id integer PRIMARY KEY, name text, data integer, datetime text);")
Every new entry in the table get index by increment of +1. So by setting it like this when I load this sqlite table on my tableview the latter entry gets diplayed at the bottom of the list and the first on the first row, while I’d obviously would like to have the order of rows/items reverted.
How do I logically proceed to do that??
Thank you…