hi Rozan,
Rob’s suggestion is essentially a way to create a global data structure for your application which can be accessed by any other module/location in your app. even though there is only one variable returned, if that variable is a table then you can put as much as you want into it.
so, starting with the flow from scene one, you could use the structure to store just the index of the row, or store just the text to display in scene two, or whatever you want:
eg, pick one of the following:
mydata.selected\_index = 45 mydata.text = "this is the text of my record" mydata.record = \<the record from sql query\>
then, in scene 2, use use that value as needed. in the last two cases, there’s nothing to do except to display the data. in the first case (with index), you would run another SQL query to find the full record.
local sql = "select \* from News where idx = " .. mydata.selected\_index
again, you can structure it as you wish. it just depends on the data you want to pass between your scenes.
also, there’s an easier way to create a global variable to use for data passing, and you don’t even need to create a module file for it. this can be accomplished with the following line located in your main:
\_G.mydata = {}