hi
i got piece of code like this
-- open database local path = system.pathForFile("movies.sqlite", system.DocumentsDirectory) db = sqlite3.open( path ) print(path) --print all the table contents local sql = "SELECT \* FROM mymovies" for row in db:nrows(sql) do local text = row.movie.."\n"..row.year local t = display.newText(text, 20, 30 \* row.id, native.systemFont, 24) t:setTextColor(255,255,255) end db:close()
actually got from dr burton site How to Download JSON data from MySQL Using Corona SDK (thx sir for great code) its work like a charm, but i got question about how to make the output look more beautiful
for now its only look like
movie title year movie title year movie title year
how to make it more beautiful like have background color for each loop with separator line for example like this (idk how to insert img, so i try to draw it using text
)
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ | | | movie title | | year | |\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_| \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ | | | movie title | | year | |\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_| \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ | | | movie title | | year | |\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_|
is it possible and how to do it thank you 