Advertisement
alestane

SQLite sample

Sep 15th, 2011
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.30 KB | None | 0 0
  1. for row in db:nrows[[SELECT * FROM a ORDER BY name ASC]] do
  2.     if row.name:sub(1,1):upper() ~= (listData[#listData] and listData[#listData].title:sub(1,1):upper()) then
  3.         table.insert(listData, {categoryName=row.name:sub(1,1):upper()})
  4.     end
  5.     table.insert(listData, {title = {label = row.name, top = 0,},})
  6. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement