Thanks for the prompt response. The code as requested
for row in db:nrows(“SELECT * FROM test where city=’”…stock…"’") do
–Code to display the image from DB.
local idtext = row.photo
local img = display.newImage(idtext,10,0 + (10 * row.id))
Display.group:insert(img)
idtext = nil
–Code to display name from DB
local idtext = row.name
local idt = display.newText(idtext, 130, 80 + (10 * row.id), native.systemFontBold, 20)
local idt = display.newText(idtext, 0, 0 + (5 * row.id), native.systemFontBold, 20)
idt:setTextColor(255,255,255)
Display.group:insert(idt)
idt.x = idt.width*0.5 + img.width + 15
idt.y = idt.y + idt.height + 6
idtext = nil
–Code to display city from DB
local idtext = row.city
local idcity = display.newText(idtext, 135, 120 + (10 * row.id), native.systemFont, 14)
idt:setTextColor(255,255,255)
Display.group:insert(idcity)
idcity.x = idcity.width*1.5 + img.width + 15
idcity.y = idt.y + idt.height + 6
idtext = nil
end
If there are multiple records for the search, i am unable to display the records one below the other.
Also i wish to add a event such that clicking on the record will open a new screen and show more data from the DB.
Help is very much appreciated. [import]uid: 56933 topic_id: 12294 reply_id: 44834[/import]